File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,13 @@ FROM node:14-slim
2
2
3
3
WORKDIR /app
4
4
5
- # Install dependencies, but don't generate lock files as we want to always fetch
6
- # the lastest @mdn/browser-compat-data package.
7
5
COPY package.json ./
8
- RUN npm install --no-package-lock && \
9
- npm cache clear --force
6
+ RUN npm install --no-package-lock; \
7
+ npm cache clean --force
10
8
11
9
# copy sources
12
10
COPY update_remote_settings_records.mjs ./
13
11
COPY ./version.json ./
14
12
15
13
# set CMD
16
- CMD ["npm " , "run" , "ingest " ]
14
+ CMD ["node " , "update_remote_settings_records.mjs " ]
Original file line number Diff line number Diff line change 5
5
"ingest" : " node update_remote_settings_records.mjs"
6
6
},
7
7
"devDependencies" : {
8
- "@mdn/browser-compat-data" : " latest" ,
9
8
"btoa" : " 1.2.1" ,
10
- "node-fetch" : " ^3.2.0 "
9
+ "node-fetch" : " ^3.2.10 "
11
10
}
12
- }
11
+ }
Original file line number Diff line number Diff line change 17
17
import fetch from "node-fetch" ;
18
18
import btoa from "btoa" ;
19
19
20
- // Use the legacy wrapper to support all Node 12+ versions.
21
- // If we only support Node 16+, can be updated to:
22
- // import bcd from '@mdn/browser-compat-data' assert { type: 'json' };
23
20
// See https://github.com/mdn/browser-compat-data.
24
- import compatData from "@mdn/browser-compat-data/forLegacyNode" ;
21
+ const response = await fetch ( "https://unpkg.com/@mdn/browser-compat-data/data.json" ) ;
22
+ const compatData = await response . json ( ) ;
25
23
26
24
const SUCCESS_RET_VALUE = 0 ;
27
25
const FAILURE_RET_VALUE = 1 ;
You can’t perform that action at this time.
0 commit comments