Skip to content

Commit f898f8e

Browse files
smorimotostyfle
andauthored
feat: add support for TypeScript 5.0's array extends in tsconfig (#1105)
- add support for TypeScript 5.0's array extends in tsconfig - drop support for Node.js 14 - remove tests for Tensorflow - update most dependencies --------- Signed-off-by: Sora Morimoto <[email protected]> Co-authored-by: Steven <[email protected]>
1 parent 2a1437b commit f898f8e

File tree

32 files changed

+1365
-776
lines changed

32 files changed

+1365
-776
lines changed

.github/workflows/ci.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,34 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
os: [ubuntu-latest, macos-latest, windows-latest]
23-
node: [14, 16, 18]
23+
node: [16, 18, 20]
2424
runs-on: ${{ matrix.os }}
2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
27+
# https://github.com/nodejs/node-gyp#installation
28+
- name: Use Python 3.11
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: '3.11'
2732
- name: Use Node.js ${{ matrix.node }}
2833
uses: actions/setup-node@v3
2934
with:
3035
cache: yarn
3136
node-version: ${{ matrix.node }}
3237
check-latest: true
3338
- name: Install Dependencies
34-
run: yarn install
39+
run: yarn global add node-gyp && yarn install --frozen-lockfile
3540
- name: Build Test Binary
3641
run: yarn build-test-binary
3742
- name: Build
3843
run: yarn build
3944
- name: Run Tests
4045
run: yarn test
4146
- name: Coverage
42-
if: matrix.os == 'ubuntu-latest' && matrix.node == 14 # only run once
47+
if: matrix.os == 'ubuntu-latest' && matrix.node == 20 # only run once
4348
run: yarn test-coverage
4449
- name: Maybe Release
45-
if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main'
50+
if: matrix.os == 'ubuntu-latest' && matrix.node == 20 && github.event_name == 'push' && github.ref == 'refs/heads/main'
4651
env:
4752
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4853
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}

package.json

+31-32
Original file line numberDiff line numberDiff line change
@@ -19,49 +19,48 @@
1919
"prepublishOnly": "node scripts/build.js --no-cache"
2020
},
2121
"devDependencies": {
22-
"@azure/cosmos": "^3.12.3",
23-
"@bugsnag/js": "^7.11.0",
22+
"@azure/cosmos": "^3.17.3",
23+
"@bugsnag/js": "^7.21.0",
2424
"@ffmpeg-installer/ffmpeg": "^1.0.17",
2525
"@google-cloud/bigquery": "^5.7.0",
26-
"@google-cloud/firestore": "^6.4.1",
27-
"@sentry/node": "^7.17.3",
28-
"@slack/web-api": "^6.3.0",
29-
"@tensorflow/tfjs-node": "^3.12.0",
30-
"@vercel/webpack-asset-relocator-loader": "1.7.2",
31-
"analytics-node": "^6.0.0",
26+
"@google-cloud/firestore": "^6.7.0",
27+
"@sentry/node": "^7.66.0",
28+
"@slack/web-api": "^6.9.0",
29+
"@vercel/webpack-asset-relocator-loader": "1.7.3",
30+
"analytics-node": "^6.2.0",
3231
"apollo-server-express": "^2.2.2",
33-
"arg": "^5.0.0",
32+
"arg": "^5.0.2",
3433
"auth0": "^2.14.0",
35-
"aws-sdk": "^2.356.0",
34+
"aws-sdk": "^2.1448.0",
3635
"axios": "^0.21.1",
3736
"azure-storage": "^2.10.2",
3837
"browserify-middleware": "^8.1.1",
39-
"bytes": "^3.0.0",
40-
"canvas": "^2.10.2",
38+
"bytes": "^3.1.2",
39+
"canvas": "^2.11.2",
4140
"chromeless": "^1.5.2",
4241
"consolidate": "^0.16.0",
4342
"copy": "^0.3.2",
4443
"core-js": "^2.5.7",
4544
"cowsay": "^1.3.1",
4645
"esm": "^3.2.22",
47-
"express": "^4.16.4",
48-
"fetch-h2": "^3.0.0",
46+
"express": "^4.18.2",
47+
"fetch-h2": "^3.0.2",
4948
"firebase": "^7.24.0",
50-
"firebase-admin": "^11.3.0",
49+
"firebase-admin": "^11.10.1",
5150
"fluent-ffmpeg": "^2.1.2",
5251
"fontkit": "^1.7.7",
5352
"get-folder-size": "^2.0.0",
5453
"glob": "^8.0.3",
5554
"got": "^12.5.2",
56-
"graceful-fs": "^4.1.15",
55+
"graceful-fs": "^4.2.11",
5756
"graphql": "^15.5.1",
5857
"hot-shots": "^8.5.0",
59-
"ioredis": "^5.1.0",
58+
"ioredis": "^5.3.2",
6059
"isomorphic-unfetch": "^3.0.0",
6160
"jest": "^27.5.1",
6261
"jimp": "^0.16.1",
6362
"jugglingdb": "2.0.1",
64-
"koa": "^2.6.2",
63+
"koa": "^2.14.2",
6564
"leveldown": "^6.0.0",
6665
"license-webpack-plugin": "^4.0.2",
6766
"lighthouse": "^8.1.0",
@@ -73,37 +72,37 @@
7372
"mkdirp": "^1.0.4",
7473
"mongoose": "^5.3.12",
7574
"mysql": "^2.16.0",
76-
"node-gyp": "^8.4.1",
75+
"node-gyp": "^9.4.0",
7776
"npm": "^6.13.4",
78-
"oracledb": "^4.2.0",
77+
"oracledb": "^6.1.0",
7978
"passport": "^0.6.0",
8079
"passport-google-oauth": "^2.0.0",
8180
"path-platform": "^0.11.15",
8281
"pdfkit": "^0.13.0",
83-
"pg": "^8.7.1",
82+
"pg": "^8.11.3",
8483
"pug": "^3.0.1",
8584
"react": "^17.0.2",
8685
"react-dom": "^17.0.2",
8786
"redis": "^3.1.1",
8887
"request": "^2.88.0",
89-
"rxjs": "^7.3.0",
88+
"rxjs": "^7.8.1",
9089
"saslprep": "^1.0.2",
91-
"sequelize": "^6.6.5",
92-
"sharp": "^0.30.5",
90+
"sequelize": "^6.32.1",
91+
"sharp": "^0.32.5",
9392
"shebang-loader": "^0.0.1",
94-
"socket.io": "^4.1.3",
93+
"socket.io": "^4.7.2",
9594
"source-map-support": "^0.5.9",
9695
"stripe": "^8.167.0",
9796
"swig": "^1.4.2",
98-
"terser": "^5.6.1",
97+
"terser": "^5.19.3",
9998
"the-answer": "^1.0.0",
100-
"tiny-json-http": "^7.0.2",
101-
"ts-loader": "^9.3.0",
102-
"tsconfig-paths": "^3.7.0",
103-
"tsconfig-paths-webpack-plugin": "^3.5.2",
99+
"tiny-json-http": "^7.5.1",
100+
"ts-loader": "^9.4.4",
101+
"tsconfig-paths": "^4.2.0",
102+
"tsconfig-paths-webpack-plugin": "^4.1.0",
104103
"twilio": "^3.23.2",
105-
"typescript": "^4.4.2",
106-
"vm2": "^3.6.6",
104+
"typescript": "^5.2.2",
105+
"vm2": "^3.9.19",
107106
"vue": "^2.5.17",
108107
"vue-server-renderer": "^2.5.17",
109108
"web-vitals": "^0.2.4",

scripts/build.js

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ async function main() {
8888
writeFileSync(__dirname + "/../dist/ncc/LICENSES.txt", cliAssets["LICENSES.txt"].source);
8989
writeFileSync(__dirname + "/../dist/ncc/cli.js.cache", cliAssets["cli.js.cache"].source);
9090
writeFileSync(__dirname + "/../dist/ncc/index.js.cache", indexAssets["index.js.cache"].source);
91-
writeFileSync(__dirname + "/../dist/ncc/mappings.wasm", indexAssets["mappings.wasm"].source);
9291
writeFileSync(__dirname + "/../dist/ncc/sourcemap-register.js.cache", sourcemapAssets["sourcemap-register.js.cache"].source);
9392
writeFileSync(__dirname + "/../dist/ncc/loaders/relocate-loader.js.cache", relocateLoaderAssets["relocate-loader.js.cache"].source);
9493
writeFileSync(__dirname + "/../dist/ncc/loaders/shebang-loader.js.cache", shebangLoaderAssets["shebang-loader.js.cache"].source);

test/integration/tensorflow.js

-2
This file was deleted.

test/unit/bundle-subasset/output-coverage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/******/ "use strict";
33
/******/ var __webpack_modules__ = ({
44

5-
/***/ 622:
5+
/***/ 17:
66
/***/ ((module) => {
77

88
module.exports = require("path");
@@ -91,7 +91,7 @@ var __webpack_exports__ = {};
9191
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
9292
(() => {
9393
__nccwpck_require__.r(__webpack_exports__);
94-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(622);
94+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(17);
9595
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
9696

9797

test/unit/custom-emit/output-coverage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/******/ (() => { // webpackBootstrap
22
/******/ var __webpack_modules__ = ({
33

4-
/***/ 747:
4+
/***/ 147:
55
/***/ ((module) => {
66

77
"use strict";
@@ -50,7 +50,7 @@ module.exports = require("fs");
5050
var __webpack_exports__ = {};
5151
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
5252
(() => {
53-
const { readFileSync } = __nccwpck_require__(747);
53+
const { readFileSync } = __nccwpck_require__(147);
5454
console.log(readFileSync(__dirname + './test.json'));
5555

5656

test/unit/double-nested-builds/output-coverage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
/***/ ((module) => {
129129

130130
"use strict";
131-
module.exports = __nccwpck_require__(622);
131+
module.exports = __nccwpck_require__(17);
132132

133133
/***/ })
134134

@@ -182,7 +182,7 @@ module.exports = __nccwpck_require__(622);
182182

183183
/***/ }),
184184

185-
/***/ 622:
185+
/***/ 17:
186186
/***/ ((module) => {
187187

188188
"use strict";

test/unit/exports-nomodule/output-coverage.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/******/ "use strict";
21
/******/ /* webpack/runtime/compat */
32
/******/
43
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";

test/unit/exports-wildcard/output-coverage.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/******/ "use strict";
21
/******/ /* webpack/runtime/compat */
32
/******/
43
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";

test/unit/externals/output-coverage.js

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
/******/ (() => { // webpackBootstrap
22
/******/ var __webpack_modules__ = ({
33

4-
/***/ 306:
4+
/***/ 378:
5+
/***/ ((module) => {
6+
7+
"use strict";
8+
module.exports = require("external-replace/replaced/some-file");
9+
10+
/***/ }),
11+
12+
/***/ 830:
513
/***/ ((module) => {
614

715
"use strict";
816
module.exports = require("externalmapped");
917

1018
/***/ }),
1119

12-
/***/ 196:
20+
/***/ 958:
1321
/***/ ((module) => {
1422

1523
"use strict";
@@ -58,12 +66,13 @@ module.exports = require("regexexternal");
5866
var __webpack_exports__ = {};
5967
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
6068
(() => {
61-
const external = __nccwpck_require__(306);
62-
const regexpExternal = __nccwpck_require__(196);
69+
const external = __nccwpck_require__(830);
70+
const regexpExternal = __nccwpck_require__(958);
71+
const regexpExternalMatch = __nccwpck_require__(378)
6372

6473
console.log(external);
6574
console.log(regexpExternal);
66-
75+
console.log(regexpExternalMatch);
6776

6877
})();
6978

test/unit/imports/output-coverage.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/******/ "use strict";
21
/******/ /* webpack/runtime/compat */
32
/******/
43
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";

test/unit/minify-sourcemap-register/output-coverage.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/minify-sourcemap-register/output-coverage.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/minify-sourcemap-register/output.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require('./sourcemap-register.js');const { readFileSync, writeFileSync } = require('fs'), { Script } = require('vm'), { wrap } = require('module');
2+
const basename = __dirname + '/index.js';
3+
const source = readFileSync(basename + '.cache.js', 'utf-8');
4+
const cachedData = !process.pkg && require('process').platform !== 'win32' && readFileSync(basename + '.cache');
5+
const scriptOpts = { filename: basename + '.cache.js', columnOffset: -62 }
6+
const script = new Script(wrap(source), cachedData ? Object.assign({ cachedData }, scriptOpts) : scriptOpts);
7+
(script.runInThisContext())(exports, require, module, __filename, __dirname);
8+
if (cachedData) process.on('exit', () => { try { writeFileSync(basename + '.cache', script.createCachedData()); } catch(e) {} });

test/unit/minify-v8cache-sourcemap-register/output-coverage.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/minify-v8cache-sourcemap-register/output.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/minify/output-coverage.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/minify/output.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/nested-builds/output-coverage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/***/ 622:
1212
/***/ ((module) => {
1313

14-
module.exports = __nccwpck_require__(622);
14+
module.exports = __nccwpck_require__(17);
1515

1616
/***/ })
1717

@@ -118,7 +118,7 @@
118118

119119
/***/ }),
120120

121-
/***/ 622:
121+
/***/ 17:
122122
/***/ ((module) => {
123123

124124
"use strict";

test/unit/ts-exts/output-coverage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
Object.defineProperty(exports, "__esModule", ({ value: true }));
10-
exports.default = {};
10+
exports["default"] = {};
1111

1212

1313
/***/ }),
@@ -17,7 +17,7 @@ exports.default = {};
1717

1818

1919
Object.defineProperty(exports, "__esModule", ({ value: true }));
20-
exports.default = void 0;
20+
exports["default"] = void 0;
2121
var dep_dep_js_1 = __nccwpck_require__(119);
2222
Object.defineProperty(exports, "default", ({ enumerable: true, get: function () { return dep_dep_js_1.default; } }));
2323

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import module from '@module';
2+
3+
console.log(module);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default {};

0 commit comments

Comments
 (0)