From 20c27db9e9cacfd3aa6773e1546f068919db1d8c Mon Sep 17 00:00:00 2001 From: Ans Date: Fri, 20 Dec 2024 15:55:21 -0500 Subject: [PATCH] Update to latest DS in Dockerfile --- .dockerignore | 1 + Dockerfile | 17 ++- package.json | 6 +- viewer/static_src/js/main.js | 2 +- yarn.lock | 252 +++++++++++++++++++---------------- 5 files changed, 155 insertions(+), 123 deletions(-) diff --git a/.dockerignore b/.dockerignore index 4891fe7..1f640f9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,7 @@ ** # ...except for all of this +!.yarnrc.yml !esbuild/**/*.js !manage.py diff --git a/Dockerfile b/Dockerfile index 90ab1f4..5c12e3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,9 @@ RUN addgroup \ ENV APP_HOME /home/$USERNAME WORKDIR $APP_HOME +# Define frontend environment. +ENV YARN_VERSION "4.5.3" + # Copy the whole project except for what is in .dockerignore. COPY --chown=$USERNAME:$USERNAME . . @@ -68,13 +71,13 @@ ENV NODE_ENV=production RUN set -eux; \ \ # Needed only at build time, so we can delete after use. - apk add --no-cache --virtual .frontend-deps \ - # TODO: Remove curl once frontend build no longer curls from www.cf.gov. - curl \ - yarn \ - ; \ - yarn global add corepack && corepack enable; \ - yarn && yarn build; \ + apk add --no-cache --virtual .frontend-deps npm \ + curl; \ + npm install -g corepack; \ + corepack enable; \ + corepack prepare yarn@${YARN_VERSION} --activate; \ + yarn install; \ + yarn build; \ # We don't need node_modules once we've built our frontend. rm -rf ./node_modules; \ apk del .frontend-deps diff --git a/package.json b/package.json index 243354b..ca5d1f8 100644 --- a/package.json +++ b/package.json @@ -13,17 +13,17 @@ "watch": "yarn build watch" }, "dependencies": { - "@cfpb/cfpb-design-system": "^3.5.0", + "@cfpb/cfpb-design-system": "3.6.2", "@csstools/postcss-sass": "5.1.1", "@csstools/sass-import-resolve": "1.0.0", "autoprefixer": "^10.4.20", - "esbuild": "^0.24.0", + "esbuild": "^0.24.2", "esbuild-plugin-copy": "^2.1.1", "postcss": "^8.4.49", "postcss-scss": "4.0.9" }, "devDependencies": { - "prettier": "^3.4.1", + "prettier": "^3.4.2", "prettier-plugin-jinja-template": "^2.0.0" }, "prettier": { diff --git a/viewer/static_src/js/main.js b/viewer/static_src/js/main.js index 94b189e..c6bd774 100644 --- a/viewer/static_src/js/main.js +++ b/viewer/static_src/js/main.js @@ -1,6 +1,6 @@ export * as MainStyles from "../css/main.scss"; -import { Expandable } from "@cfpb/cfpb-design-system/src/index.js"; +import { Expandable } from "@cfpb/cfpb-design-system"; const docElement = document.documentElement; docElement.className = docElement.className.replace( diff --git a/yarn.lock b/yarn.lock index 432b29a..37605ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,10 +5,12 @@ __metadata: version: 8 cacheKey: 10c0 -"@cfpb/cfpb-design-system@npm:^3.5.0": - version: 3.5.0 - resolution: "@cfpb/cfpb-design-system@npm:3.5.0" - checksum: 10c0/70d810c18f07553c5d33600d56cf2ba7bab855cd6ce98f652bb5958f414a283bbaf20fc04ea36ec20bb084b9c37e5bf7b48f6e2b8954ea736f7c2f0c8f9ae7fd +"@cfpb/cfpb-design-system@npm:3.6.2": + version: 3.6.2 + resolution: "@cfpb/cfpb-design-system@npm:3.6.2" + dependencies: + tippy.js: "npm:6.3.7" + checksum: 10c0/55a3d39c6465021d742a97285f868c3eef6cd6c13e74dbdaa3e48d02bc93ab4b05dab1e6cacb28b08966b8e870f4d130a61143db02b55bedc81de2e61955f068 languageName: node linkType: hard @@ -32,170 +34,177 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/aix-ppc64@npm:0.24.0" +"@esbuild/aix-ppc64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/aix-ppc64@npm:0.24.2" conditions: os=aix & cpu=ppc64 languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/android-arm64@npm:0.24.0" +"@esbuild/android-arm64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/android-arm64@npm:0.24.2" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/android-arm@npm:0.24.0" +"@esbuild/android-arm@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/android-arm@npm:0.24.2" conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/android-x64@npm:0.24.0" +"@esbuild/android-x64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/android-x64@npm:0.24.2" conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/darwin-arm64@npm:0.24.0" +"@esbuild/darwin-arm64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/darwin-arm64@npm:0.24.2" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/darwin-x64@npm:0.24.0" +"@esbuild/darwin-x64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/darwin-x64@npm:0.24.2" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/freebsd-arm64@npm:0.24.0" +"@esbuild/freebsd-arm64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/freebsd-arm64@npm:0.24.2" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/freebsd-x64@npm:0.24.0" +"@esbuild/freebsd-x64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/freebsd-x64@npm:0.24.2" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-arm64@npm:0.24.0" +"@esbuild/linux-arm64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-arm64@npm:0.24.2" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-arm@npm:0.24.0" +"@esbuild/linux-arm@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-arm@npm:0.24.2" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-ia32@npm:0.24.0" +"@esbuild/linux-ia32@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-ia32@npm:0.24.2" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-loong64@npm:0.24.0" +"@esbuild/linux-loong64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-loong64@npm:0.24.2" conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-mips64el@npm:0.24.0" +"@esbuild/linux-mips64el@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-mips64el@npm:0.24.2" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-ppc64@npm:0.24.0" +"@esbuild/linux-ppc64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-ppc64@npm:0.24.2" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-riscv64@npm:0.24.0" +"@esbuild/linux-riscv64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-riscv64@npm:0.24.2" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-s390x@npm:0.24.0" +"@esbuild/linux-s390x@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-s390x@npm:0.24.2" conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-x64@npm:0.24.0" +"@esbuild/linux-x64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/linux-x64@npm:0.24.2" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/netbsd-x64@npm:0.24.0" +"@esbuild/netbsd-arm64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/netbsd-arm64@npm:0.24.2" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/netbsd-x64@npm:0.24.2" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/openbsd-arm64@npm:0.24.0" +"@esbuild/openbsd-arm64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/openbsd-arm64@npm:0.24.2" conditions: os=openbsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/openbsd-x64@npm:0.24.0" +"@esbuild/openbsd-x64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/openbsd-x64@npm:0.24.2" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/sunos-x64@npm:0.24.0" +"@esbuild/sunos-x64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/sunos-x64@npm:0.24.2" conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/win32-arm64@npm:0.24.0" +"@esbuild/win32-arm64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/win32-arm64@npm:0.24.2" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/win32-ia32@npm:0.24.0" +"@esbuild/win32-ia32@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/win32-ia32@npm:0.24.2" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/win32-x64@npm:0.24.0" +"@esbuild/win32-x64@npm:0.24.2": + version: 0.24.2 + resolution: "@esbuild/win32-x64@npm:0.24.2" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -414,6 +423,13 @@ __metadata: languageName: node linkType: hard +"@popperjs/core@npm:^2.9.0": + version: 2.11.8 + resolution: "@popperjs/core@npm:2.11.8" + checksum: 10c0/4681e682abc006d25eb380d0cf3efc7557043f53b6aea7a5057d0d1e7df849a00e281cd8ea79c902a35a414d7919621fc2ba293ecec05f413598e0b23d5a1e63 + languageName: node + linkType: hard + "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" @@ -752,34 +768,35 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.24.0": - version: 0.24.0 - resolution: "esbuild@npm:0.24.0" - dependencies: - "@esbuild/aix-ppc64": "npm:0.24.0" - "@esbuild/android-arm": "npm:0.24.0" - "@esbuild/android-arm64": "npm:0.24.0" - "@esbuild/android-x64": "npm:0.24.0" - "@esbuild/darwin-arm64": "npm:0.24.0" - "@esbuild/darwin-x64": "npm:0.24.0" - "@esbuild/freebsd-arm64": "npm:0.24.0" - "@esbuild/freebsd-x64": "npm:0.24.0" - "@esbuild/linux-arm": "npm:0.24.0" - "@esbuild/linux-arm64": "npm:0.24.0" - "@esbuild/linux-ia32": "npm:0.24.0" - "@esbuild/linux-loong64": "npm:0.24.0" - "@esbuild/linux-mips64el": "npm:0.24.0" - "@esbuild/linux-ppc64": "npm:0.24.0" - "@esbuild/linux-riscv64": "npm:0.24.0" - "@esbuild/linux-s390x": "npm:0.24.0" - "@esbuild/linux-x64": "npm:0.24.0" - "@esbuild/netbsd-x64": "npm:0.24.0" - "@esbuild/openbsd-arm64": "npm:0.24.0" - "@esbuild/openbsd-x64": "npm:0.24.0" - "@esbuild/sunos-x64": "npm:0.24.0" - "@esbuild/win32-arm64": "npm:0.24.0" - "@esbuild/win32-ia32": "npm:0.24.0" - "@esbuild/win32-x64": "npm:0.24.0" +"esbuild@npm:^0.24.2": + version: 0.24.2 + resolution: "esbuild@npm:0.24.2" + dependencies: + "@esbuild/aix-ppc64": "npm:0.24.2" + "@esbuild/android-arm": "npm:0.24.2" + "@esbuild/android-arm64": "npm:0.24.2" + "@esbuild/android-x64": "npm:0.24.2" + "@esbuild/darwin-arm64": "npm:0.24.2" + "@esbuild/darwin-x64": "npm:0.24.2" + "@esbuild/freebsd-arm64": "npm:0.24.2" + "@esbuild/freebsd-x64": "npm:0.24.2" + "@esbuild/linux-arm": "npm:0.24.2" + "@esbuild/linux-arm64": "npm:0.24.2" + "@esbuild/linux-ia32": "npm:0.24.2" + "@esbuild/linux-loong64": "npm:0.24.2" + "@esbuild/linux-mips64el": "npm:0.24.2" + "@esbuild/linux-ppc64": "npm:0.24.2" + "@esbuild/linux-riscv64": "npm:0.24.2" + "@esbuild/linux-s390x": "npm:0.24.2" + "@esbuild/linux-x64": "npm:0.24.2" + "@esbuild/netbsd-arm64": "npm:0.24.2" + "@esbuild/netbsd-x64": "npm:0.24.2" + "@esbuild/openbsd-arm64": "npm:0.24.2" + "@esbuild/openbsd-x64": "npm:0.24.2" + "@esbuild/sunos-x64": "npm:0.24.2" + "@esbuild/win32-arm64": "npm:0.24.2" + "@esbuild/win32-ia32": "npm:0.24.2" + "@esbuild/win32-x64": "npm:0.24.2" dependenciesMeta: "@esbuild/aix-ppc64": optional: true @@ -815,6 +832,8 @@ __metadata: optional: true "@esbuild/linux-x64": optional: true + "@esbuild/netbsd-arm64": + optional: true "@esbuild/netbsd-x64": optional: true "@esbuild/openbsd-arm64": @@ -831,7 +850,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: 10c0/9f1aadd8d64f3bff422ae78387e66e51a5e09de6935a6f987b6e4e189ed00fdc2d1bc03d2e33633b094008529c8b6e06c7ad1a9782fb09fec223bf95998c0683 + checksum: 10c0/5a25bb08b6ba23db6e66851828d848bd3ff87c005a48c02d83e38879058929878a6baa5a414e1141faee0d1dece3f32b5fbc2a87b82ed6a7aa857cf40359aeb5 languageName: node linkType: hard @@ -1492,12 +1511,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.4.1": - version: 3.4.1 - resolution: "prettier@npm:3.4.1" +"prettier@npm:^3.4.2": + version: 3.4.2 + resolution: "prettier@npm:3.4.2" bin: prettier: bin/prettier.cjs - checksum: 10c0/2d6cc3101ad9de72b49c59339480b0983e6ff6742143da0c43f476bf3b5ef88ede42ebd9956d7a0a8fa59f7a5990e8ef03c9ad4c37f7e4c9e5db43ee0853156c + checksum: 10c0/99e076a26ed0aba4ebc043880d0f08bbb8c59a4c6641cdee6cdadf2205bdd87aa1d7823f50c3aea41e015e99878d37c58d7b5f0e663bba0ef047f94e36b96446 languageName: node linkType: hard @@ -1748,6 +1767,15 @@ __metadata: languageName: node linkType: hard +"tippy.js@npm:6.3.7": + version: 6.3.7 + resolution: "tippy.js@npm:6.3.7" + dependencies: + "@popperjs/core": "npm:^2.9.0" + checksum: 10c0/ec3677beb8caec791ee1f715663f28f42d60e0f7250074a047d13d5e6db95fdb6d26d8a3ac16cecb4ebcaf33ae919dbc889cf97948d115e8d3c81518c911b379 + languageName: node + linkType: hard + "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -1800,15 +1828,15 @@ __metadata: version: 0.0.0-use.local resolution: "website-indexer@workspace:." dependencies: - "@cfpb/cfpb-design-system": "npm:^3.5.0" + "@cfpb/cfpb-design-system": "npm:3.6.2" "@csstools/postcss-sass": "npm:5.1.1" "@csstools/sass-import-resolve": "npm:1.0.0" autoprefixer: "npm:^10.4.20" - esbuild: "npm:^0.24.0" + esbuild: "npm:^0.24.2" esbuild-plugin-copy: "npm:^2.1.1" postcss: "npm:^8.4.49" postcss-scss: "npm:4.0.9" - prettier: "npm:^3.4.1" + prettier: "npm:^3.4.2" prettier-plugin-jinja-template: "npm:^2.0.0" languageName: unknown linkType: soft