Skip to content

Commit 8e43860

Browse files
committed
chore(NPM): package dependencies updates, notably latest TypeScript with a few breaking changes (moving towards Go implementation which we have been aligning with for several months now, but WebPack's ts-loader needs a temporary patch until fixed upstream)
1 parent ea90383 commit 8e43860

File tree

7 files changed

+271
-252
lines changed

7 files changed

+271
-252
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,12 @@ jobs:
185185
- name: NPM install (arm64)
186186
#if: ${{ matrix.osarch == 'linux-arm' || matrix.osarch == 'windows-arm' || matrix.osarch == 'macos-arm' }}
187187
if: endsWith(matrix.osarch, '-arm')
188-
run: npm ci --ignore-scripts --foreground-scripts --arch=arm64 --cpu=arm64 && cd node_modules/electron && npm run postinstall --arch=arm64 --cpu=arm64 && cd -
188+
run: npm ci --ignore-scripts --foreground-scripts --arch=arm64 --cpu=arm64 && npm run postinstall && cd node_modules/electron && npm run postinstall --arch=arm64 --cpu=arm64 && cd -
189189
#export npm_config_arch=arm64 && export npm_config_cpu=arm64 &&
190190
- name: NPM install (x64)
191191
#if: ${{ matrix.osarch == 'linux-intel' || matrix.osarch == 'windows-intel' || matrix.osarch == 'macos-intel' }}
192192
if: endsWith(matrix.osarch, '-intel')
193-
run: npm ci --ignore-scripts --foreground-scripts --arch=x64 --cpu=x64 && cd node_modules/electron && npm run postinstall --arch=x64 --cpu=x64 && cd -
193+
run: npm ci --ignore-scripts --foreground-scripts --arch=x64 --cpu=x64 && npm run postinstall && cd node_modules/electron && npm run postinstall --arch=x64 --cpu=x64 && cd -
194194
#export npm_config_arch=x64 && export npm_config_cpu=x64 &&
195195
- name: Electron version + arch (Windows)
196196
#if: ${{ matrix.osarch == 'windows-intel' || matrix.osarch == 'windows-arm' }}

package-lock.json

Lines changed: 237 additions & 235 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"type": "commonjs",
1515
"main": "dist/main.js",
1616
"scripts": {
17+
"postinstall": "node -e 'const path = require(\"path\"); const fs = require(\"fs\"); const filePath = path.join(process.cwd(), \"node_modules/ts-loader/dist/index.js\"); let fileStr = fs.readFileSync(filePath, { encoding: \"utf8\" }); fileStr = fileStr.replace(/, rootDir: undefined/, ``); fs.writeFileSync(filePath, fileStr, { encoding: \"utf8\" });'",
1718
"clean": "rimraf dist && rimraf release",
1819
"test": "cross-env JEST_TESTS=1 jest --config=jest.config.js --verbose --runInBand --bail=1 --no-cache \"test\"",
1920
"testFile": "cross-env JEST_TESTS=1 jest --config=jest.config.js --verbose --runInBand --bail=1 --no-cache ",
@@ -324,7 +325,7 @@
324325
"glob": "^13.0.6",
325326
"he": "^1.2.0",
326327
"history": "^5.3.0",
327-
"i18next": "^25.10.5",
328+
"i18next": "^25.10.10",
328329
"image-size": "^2.0.2",
329330
"inversify": "^8.1.0",
330331
"jsdom": "^26.1.0",
@@ -419,9 +420,9 @@
419420
"@types/yargs": "^17.0.35",
420421
"@types/yauzl": "^2.10.3",
421422
"@types/yazl": "^3.3.0",
422-
"@typescript-eslint/eslint-plugin": "^8.57.1",
423-
"@typescript-eslint/parser": "^8.57.1",
424-
"@typescript/native-preview": "^7.0.0-dev.20260323.1",
423+
"@typescript-eslint/eslint-plugin": "^8.57.2",
424+
"@typescript-eslint/parser": "^8.57.2",
425+
"@typescript/native-preview": "^7.0.0-dev.20260326.1",
425426
"babel-loader": "^10.1.1",
426427
"babel-plugin-macros": "^3.1.0",
427428
"chokidar": "^5.0.0",
@@ -433,7 +434,7 @@
433434
"css-loader": "^7.1.4",
434435
"devtron": "^1.4.0",
435436
"dotenv": "^17.3.1",
436-
"electron": "^40.8.3",
437+
"electron": "^40.8.4",
437438
"electron-builder": "^26.8.1",
438439
"electron-devtools-installer": "^4.0.0",
439440
"eslint": "^8.57.1",
@@ -451,7 +452,7 @@
451452
"jest": "^30.3.0",
452453
"json-diff": "^1.0.6",
453454
"markdown-loader": "^8.0.0",
454-
"mini-css-extract-plugin": "^2.10.1",
455+
"mini-css-extract-plugin": "^2.10.2",
455456
"ncp": "^2.0.0",
456457
"npm-scripts-lifecycle": "^1.0.0",
457458
"prettier": "^3.8.1",
@@ -462,7 +463,7 @@
462463
"sass-loader": "^16.0.7",
463464
"schema-utils": "^4.3.3",
464465
"style-loader": "^4.0.0",
465-
"stylelint": "^17.5.0",
466+
"stylelint": "^17.6.0",
466467
"stylelint-config-standard": "^40.0.0",
467468
"stylelint-config-standard-scss": "^17.0.0",
468469
"svg-sprite-loader": "^6.0.11",
@@ -474,11 +475,22 @@
474475
"tsc-alias": "^1.8.16",
475476
"tsconfig-paths": "^4.2.0",
476477
"typed-scss-modules": "^8.1.1",
477-
"typescript": "^5.9.3",
478+
"typescript": "^6.0.2",
478479
"webpack": "^5.105.4",
479-
"webpack-bundle-analyzer": "^5.2.0",
480+
"webpack-bundle-analyzer": "^5.3.0",
480481
"webpack-cli": "^7.0.2",
481482
"webpack-dev-server": "^5.2.3",
482483
"webpack-node-externals": "^3.0.0"
484+
},
485+
"overrides": {
486+
"@typescript-eslint/parser": {
487+
"typescript": "^6.0.2"
488+
},
489+
"@typescript-eslint/eslint-plugin": {
490+
"typescript": "^6.0.2"
491+
},
492+
"ts-jest": {
493+
"typescript": "^6.0.2"
494+
}
483495
}
484496
}

scripts/npm-install-lockfile-refresh.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
# https://www.npmjs.com/package/npm-scripts-lifecycle
44
# https://app.unpkg.com/npm-scripts-lifecycle@1.0.0/files/package.json
55

6+
## TODO remove the local `npm run postinstall` once this is fixed:
7+
# https://github.com/TypeStrong/ts-loader/issues/1678
8+
# (remember to do the main.yaml GitHub Actions Workflow definition too, see `npm ci`)
9+
610
npm cache clear --force
7-
rm -rf node_modules/ && rm -f package-lock.json && npm install --ignore-scripts --foreground-scripts && npm run build:prod
11+
rm -rf node_modules/ && rm -f package-lock.json && npm install --ignore-scripts --foreground-scripts && npm run postinstall && npm run build:prod
812

913
# npm install --foreground-scripts
1014
# TODO: preinstall, install and postinstall NPM lifecycle hooks for Electron, fsevents, ParcelWatcher, etc.?

src/r2-xxx-js/r2-opds-js/opds/opds2/opds2-link.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ export class OPDSLink extends Link {
4141
// tslint:disable-next-line:max-line-length
4242
// https://github.com/opds-community/drafts/blob/aa414dc7150588dbb422be2c643a7a74fec6e64d/schema/properties.schema.json
4343
@JsonProperty(PROPERTIES_JSON_PROP)
44-
public Properties!: OPDSProperties;
44+
public declare Properties: OPDSProperties;
4545
}

tsconfig-customization.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// "noImplicitUseStrict": false,
3232
// "suppressExcessPropertyErrors": false,
3333
// "suppressImplicitAnyIndexErrors": false,
34-
"downlevelIteration": false,
34+
// "downlevelIteration": false,
3535
"emitBOM": false,
3636
// "esModuleInterop": false,
3737
"allowSyntheticDefaultImports": true,
@@ -57,7 +57,7 @@
5757
// "dom",
5858
// "dom.iterable"
5959
// ],
60-
"target": "es2022",
60+
"target": "es2025",
6161
// "jsx": "react",
6262
"experimentalDecorators": true,
6363
"emitDecoratorMetadata": true,

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"strictNullChecks": false,
44
"strictPropertyInitialization": false,
55
"outDir": "./dist/",
6+
"rootDir": "./",
67
"sourceMap": true,
78
"inlineSourceMap": false,
89
"inlineSources": false,
@@ -32,7 +33,7 @@
3233
// "noImplicitUseStrict": false,
3334
// "suppressExcessPropertyErrors": false,
3435
// "suppressImplicitAnyIndexErrors": false,
35-
"downlevelIteration": false,
36+
// "downlevelIteration": false,
3637
"emitBOM": false,
3738
// "esModuleInterop": false,
3839
"allowSyntheticDefaultImports": true,
@@ -54,7 +55,7 @@
5455
// "moduleResolution": "node", // 100
5556
"moduleResolution": "bundler", // 100
5657
"lib": ["es2022", "dom", "dom.iterable"],
57-
"target": "es2020",
58+
"target": "es2025",
5859
"jsx": "react",
5960
"experimentalDecorators": true,
6061
"emitDecoratorMetadata": true,

0 commit comments

Comments
 (0)