File tree 5 files changed +1
-261
lines changed
5 files changed +1
-261
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import indexRoutes from './routes/index.js';
10
10
import librariesRoutes from './routes/libraries.js' ;
11
11
import libraryRoutes from './routes/library.js' ;
12
12
import statsRoutes from './routes/stats.js' ;
13
- import tutorialsRoutes from './routes/tutorials.js' ;
14
13
import whitelistRoutes from './routes/whitelist.js' ;
15
14
import corsOptions from './utils/cors.js' ;
16
15
@@ -65,7 +64,6 @@ if (typeof SENTRY_DSN === 'string') {
65
64
indexRoutes ( app ) ;
66
65
statsRoutes ( app ) ;
67
66
whitelistRoutes ( app ) ;
68
- tutorialsRoutes ( app ) ;
69
67
libraryRoutes ( app ) ;
70
68
librariesRoutes ( app ) ;
71
69
errorRoutes ( app ) ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export default app => {
81
81
} ) ;
82
82
if ( ! lib ) return notFound ( ctx , 'Library' ) ;
83
83
84
- // Generate the initial filtered response (without SRI, tutorials, versions or assets data)
84
+ // Generate the initial filtered response (without SRI, versions or assets data)
85
85
const requestedFields = queryArray ( ctx . req . queries ( 'fields' ) ) ;
86
86
const response = filter (
87
87
{
@@ -92,7 +92,6 @@ export default app => {
92
92
sri : null ,
93
93
// All other lib props
94
94
...lib ,
95
- tutorials : null ,
96
95
versions : null ,
97
96
assets : null ,
98
97
} ,
@@ -101,9 +100,6 @@ export default app => {
101
100
! requestedFields . length || requestedFields . includes ( '*' ) ,
102
101
) ;
103
102
104
- // Tutorials are deprecated, so return an empty array if requested
105
- if ( 'tutorials' in response ) response . tutorials = [ ] ;
106
-
107
103
// Get versions if needed
108
104
if ( 'versions' in response ) response . versions = await libraryVersions ( lib . name ) ;
109
105
Original file line number Diff line number Diff line change @@ -320,7 +320,6 @@ describe('/libraries/:library', () => {
320
320
expect ( response . body ) . to . have . property ( 'autoupdate' ) . that . is . an ( 'object' ) ;
321
321
expect ( response . body ) . to . have . property ( 'assets' ) . that . is . an ( 'array' ) ;
322
322
expect ( response . body ) . to . have . property ( 'versions' ) . that . is . an ( 'array' ) ;
323
- expect ( response . body ) . to . have . property ( 'tutorials' ) . that . is . an ( 'array' ) ;
324
323
} ) ;
325
324
it ( 'has a CDN url for the \'latest\' property' , ( ) => {
326
325
expect ( response . body . latest ) . to . match ( / h t t p s : \/ \/ c d n j s \. c l o u d f l a r e \. c o m \/ a j a x \/ l i b s \/ .+ \/ .+ \/ .* / ) ;
@@ -347,11 +346,6 @@ describe('/libraries/:library', () => {
347
346
}
348
347
} ) ;
349
348
} ) ;
350
- describe ( 'Tutorials array' , ( ) => {
351
- it ( 'is empty' , ( ) => {
352
- expect ( response . body . tutorials ) . to . be . empty ;
353
- } ) ;
354
- } ) ;
355
349
} ) ;
356
350
} ) ;
357
351
@@ -521,7 +515,6 @@ describe('/libraries/:library', () => {
521
515
expect ( response . body ) . to . have . property ( 'autoupdate' ) . that . is . an ( 'object' ) ;
522
516
expect ( response . body ) . to . have . property ( 'assets' ) . that . is . an ( 'array' ) ;
523
517
expect ( response . body ) . to . have . property ( 'versions' ) . that . is . an ( 'array' ) ;
524
- expect ( response . body ) . to . have . property ( 'tutorials' ) . that . is . an ( 'array' ) ;
525
518
} ) ;
526
519
} ) ;
527
520
} ) ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments