@smi-digital/create-smi-app 2.11.1 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smi-digital/create-smi-app",
3
- "version": "2.11.1",
3
+ "version": "2.11.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -11,10 +11,13 @@ RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev l
11
11
  WORKDIR /opt/
12
12
  COPY package.json package-lock.json* ./
13
13
  RUN npm install -g node-gyp
14
- # Use `npm ci` for a deterministic install straight from the lockfile. This also
15
- # installs sharp's pinned prebuilt musl binary (@img/sharp-linuxmusl-x64), which
16
- # `npm install` skips when the lockfile was generated on another OS (npm/cli#4828).
17
- RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci
14
+ # `npm ci` for a deterministic install from the lockfile. The --os/--libc/--cpu
15
+ # flags force npm to install sharp's prebuilt musl binary (@img/sharp-linuxmusl-x64,
16
+ # already pinned in the lockfile). Without them, npm skips it when the lockfile was
17
+ # generated on another OS and sharp falls back to a failing source build. This is
18
+ # sharp's documented workaround for npm bug #4828. Flags target linux x64 deploys;
19
+ # change --cpu=arm64 for arm builds.
20
+ RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --os=linux --libc=musl --cpu=x64
18
21
  ENV PATH=/opt/node_modules/.bin:$PATH
19
22
 
20
23
  WORKDIR /opt/app
@@ -30,8 +33,8 @@ ENV NODE_ENV=${NODE_ENV}
30
33
  WORKDIR /opt/
31
34
  COPY package.json package-lock.json* ./
32
35
  RUN npm install -g node-gyp
33
- # Deterministic prod install from the lockfile (see builder stage note re: sharp).
34
- RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --omit=dev
36
+ # Deterministic prod install from the lockfile; same sharp/musl flags as builder.
37
+ RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --omit=dev --os=linux --libc=musl --cpu=x64
35
38
  ENV PATH=/opt/node_modules/.bin:$PATH
36
39
 
37
40
  WORKDIR /opt/app