Feature/upgrade replace-in-file to version 8.3.0 (#4167)

* Upgrade replace-in-file to version 8.3.0

* Update changelog
pull/4161/head^2
Thomas Kaul 6 days ago committed by GitHub
parent 02681cc479
commit b1340a96e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Introduced `extends` in the `docker-compose` files - Introduced `extends` in the `docker-compose` files
- Improved the language localization for German (`de`) - Improved the language localization for German (`de`)
- Refreshed the cryptocurrencies list - Refreshed the cryptocurrencies list
- Upgraded `replace-in-file` from version `7.0.1` to `8.3.0`
### Fixed ### Fixed

@ -25,13 +25,13 @@ RUN npm install
COPY ./decorate-angular-cli.js decorate-angular-cli.js COPY ./decorate-angular-cli.js decorate-angular-cli.js
RUN node decorate-angular-cli.js RUN node decorate-angular-cli.js
COPY ./nx.json nx.json COPY ./apps apps
COPY ./replace.build.js replace.build.js COPY ./libs libs
COPY ./jest.preset.js jest.preset.js
COPY ./jest.config.ts jest.config.ts COPY ./jest.config.ts jest.config.ts
COPY ./jest.preset.js jest.preset.js
COPY ./nx.json nx.json
COPY ./replace.build.mjs replace.build.mjs
COPY ./tsconfig.base.json tsconfig.base.json COPY ./tsconfig.base.json tsconfig.base.json
COPY ./libs libs
COPY ./apps apps
RUN npm run build:production RUN npm run build:production

59
package-lock.json generated

@ -152,7 +152,7 @@
"prisma": "6.1.0", "prisma": "6.1.0",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"replace-in-file": "7.0.1", "replace-in-file": "8.3.0",
"shx": "0.3.4", "shx": "0.3.4",
"storybook": "8.4.7", "storybook": "8.4.7",
"ts-jest": "29.1.0", "ts-jest": "29.1.0",
@ -28991,54 +28991,71 @@
} }
}, },
"node_modules/replace-in-file": { "node_modules/replace-in-file": {
"version": "7.0.1", "version": "8.3.0",
"resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-7.0.1.tgz", "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-8.3.0.tgz",
"integrity": "sha512-KbhgPq04eA+TxXuUxpgWIH9k/TjF+28ofon2PXP7vq6izAILhxOtksCVcLuuQLtyjouBaPdlH6RJYYcSPVxCOA==", "integrity": "sha512-4VhddQiMCPIuypiwHDTM+XHjZoVu9h7ngBbSCnwGRcwdHwxltjt/m//Ep3GDwqaOx1fDSrKFQ+n7uo4uVcEz9Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"chalk": "^4.1.2", "chalk": "^5.3.0",
"glob": "^8.1.0", "glob": "^10.4.2",
"yargs": "^17.7.2" "yargs": "^17.7.2"
}, },
"bin": { "bin": {
"replace-in-file": "bin/cli.js" "replace-in-file": "bin/cli.js"
}, },
"engines": { "engines": {
"node": ">=10" "node": ">=18"
}
},
"node_modules/replace-in-file/node_modules/chalk": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
"integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.17.0 || ^14.13 || >=16.0.0"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
} }
}, },
"node_modules/replace-in-file/node_modules/glob": { "node_modules/replace-in-file/node_modules/glob": {
"version": "8.1.0", "version": "10.4.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
"dev": true, "dev": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"fs.realpath": "^1.0.0", "foreground-child": "^3.1.0",
"inflight": "^1.0.4", "jackspeak": "^3.1.2",
"inherits": "2", "minimatch": "^9.0.4",
"minimatch": "^5.0.1", "minipass": "^7.1.2",
"once": "^1.3.0" "package-json-from-dist": "^1.0.0",
"path-scurry": "^1.11.1"
}, },
"engines": { "bin": {
"node": ">=12" "glob": "dist/esm/bin.mjs"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/replace-in-file/node_modules/minimatch": { "node_modules/replace-in-file/node_modules/minimatch": {
"version": "5.1.6", "version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true, "dev": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"brace-expansion": "^2.0.1" "brace-expansion": "^2.0.1"
}, },
"engines": { "engines": {
"node": ">=10" "node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/request-progress": { "node_modules/request-progress": {

@ -39,7 +39,7 @@
"postinstall": "prisma generate", "postinstall": "prisma generate",
"prepare": "husky", "prepare": "husky",
"prisma": "prisma", "prisma": "prisma",
"replace-placeholders-in-build": "node ./replace.build.js", "replace-placeholders-in-build": "node ./replace.build.mjs",
"start": "node dist/apps/api/main", "start": "node dist/apps/api/main",
"start:client": "nx run client:copy-assets && nx run client:serve --configuration=development-en --hmr -o", "start:client": "nx run client:copy-assets && nx run client:serve --configuration=development-en --hmr -o",
"start:production": "npm run database:migrate && npm run database:seed && node main", "start:production": "npm run database:migrate && npm run database:seed && node main",
@ -198,7 +198,7 @@
"prisma": "6.1.0", "prisma": "6.1.0",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"replace-in-file": "7.0.1", "replace-in-file": "8.3.0",
"shx": "0.3.4", "shx": "0.3.4",
"storybook": "8.4.7", "storybook": "8.4.7",
"ts-jest": "29.1.0", "ts-jest": "29.1.0",

@ -1,9 +1,13 @@
const dotenv = require('dotenv'); import dotenv from 'dotenv';
const path = require('path'); import { dirname, resolve } from 'path';
const replace = require('replace-in-file'); import { replaceInFileSync } from 'replace-in-file';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
dotenv.config({ dotenv.config({
path: path.resolve(__dirname, '.env') path: resolve(__dirname, '.env')
}); });
const now = new Date(); const now = new Date();
@ -16,7 +20,7 @@ const buildTimestamp = `${formatWithTwoDigits(
)}:${formatWithTwoDigits(now.getMinutes())}`; )}:${formatWithTwoDigits(now.getMinutes())}`;
try { try {
const changedFiles = replace.sync({ const changedFiles = replaceInFileSync({
files: './dist/apps/client/main.*.js', files: './dist/apps/client/main.*.js',
from: /{BUILD_TIMESTAMP}/g, from: /{BUILD_TIMESTAMP}/g,
to: buildTimestamp, to: buildTimestamp,
Loading…
Cancel
Save