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
22
33WORKDIR /app
44
5- # Install dependencies, but don't generate lock files as we want to always fetch
6- # the lastest @mdn/browser-compat-data package.
75COPY 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
108
119# copy sources
1210COPY update_remote_settings_records.mjs ./
1311COPY ./version.json ./
1412
1513# 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 55 "ingest" : " node update_remote_settings_records.mjs"
66 },
77 "devDependencies" : {
8- "@mdn/browser-compat-data" : " latest" ,
98 "btoa" : " 1.2.1" ,
10- "node-fetch" : " ^3.2.0 "
9+ "node-fetch" : " ^3.2.10 "
1110 }
12- }
11+ }
Original file line number Diff line number Diff line change 1717import fetch from "node-fetch" ;
1818import btoa from "btoa" ;
1919
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' };
2320// 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 ( ) ;
2523
2624const SUCCESS_RET_VALUE = 0 ;
2725const FAILURE_RET_VALUE = 1 ;
You can’t perform that action at this time.
0 commit comments