Skip to content

Commit bbcef8f

Browse files
authored
Merge pull request #1210 from aurelia/deps
chore: upgrade deps
2 parents d8707f4 + 1cb60d4 commit bbcef8f

16 files changed

+86
-77
lines changed

.eslintignore

-2
This file was deleted.

.eslintrc.json

-25
This file was deleted.

eslint.config.mjs

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import globals from "globals";
2+
import eslint from "@eslint/js";
3+
4+
export default [
5+
{
6+
ignores: ["lib/build/amodro-trace", "**/dist"],
7+
},
8+
eslint.configs.recommended,
9+
{
10+
languageOptions: {
11+
globals: {
12+
...globals.node,
13+
...globals.jasmine,
14+
},
15+
16+
ecmaVersion: 2019,
17+
sourceType: "commonjs",
18+
},
19+
20+
rules: {
21+
"no-prototype-builtins": 0,
22+
"no-console": 0,
23+
"getter-return": 0,
24+
"no-inner-declarations": 0,
25+
26+
"comma-dangle": ["error", {
27+
arrays: "never",
28+
objects: "never",
29+
imports: "never",
30+
exports: "never",
31+
functions: "never",
32+
}],
33+
},
34+
}
35+
];

lib/build/bundle.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ exports.Bundle = class {
177177
// in AMD module environment. There is special code in lib/build/amodro-trace/write/defines.js
178178
// to bring up global var "moment".
179179
const special = [];
180-
while (true) { // eslint-disable-line no-constant-condition
180+
while (true) {
181181
const idx = sorted.findIndex(f => f.dependencyInclusion && (
182182
f.dependencyInclusion.description.name === 'jquery' ||
183183
f.dependencyInclusion.description.name === 'moment'));
@@ -284,15 +284,17 @@ exports.Bundle = class {
284284
if (base64SourceMap) {
285285
return null;
286286
}
287-
} catch (error) {
287+
} catch {
288288
// we don't want the build to fail when a sourcemap file can't be parsed
289289
return null;
290290
}
291291

292292
let converter;
293293

294294
try {
295-
converter = Convert.fromMapFileSource(file.contents.toString(), parsedPath.dir);
295+
converter = Convert.fromMapFileSource(file.contents.toString(), (filename) =>
296+
fs.readFileSync(path.resolve(parsedPath.dir, filename), 'utf-8')
297+
);
296298
} catch (e) {
297299
logger.error(e);
298300
return null;

lib/build/bundled-source.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ exports.BundledSource = class {
227227

228228
try {
229229
contents = cjsTransform(modulePath, this.contents, forceCjsWrap);
230-
} catch (ignore) {
230+
} catch {
231231
// file is not in amd/cjs format, try native es module
232232
try {
233233
contents = esTransform(modulePath, this.contents);

lib/build/dependency-description.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ exports.DependencyDescription = class {
3535

3636
try {
3737
return fs.readFileSync(p).toString();
38-
} catch (e) {
38+
} catch {
3939
console.log('error', p);
4040
return '';
4141
}

lib/build/dependency-inclusion.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const path = require('path');
22
const SourceInclusion = require('./source-inclusion').SourceInclusion;
3-
const minimatch = require('minimatch');
3+
const { minimatch } = require('minimatch');
44
const Utils = require('./utils');
55
const logger = require('aurelia-logging').getLogger('DependencyInclusion');
66

lib/build/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const Bundler = require('./bundler').Bundler;
33
const PackageAnalyzer = require('./package-analyzer').PackageAnalyzer;
44
const PackageInstaller = require('./package-installer').PackageInstaller;
55
const cacheDir = require('./utils').cacheDir;
6-
const del = require('del');
6+
const fs = require('fs');
77

88
let bundler;
99
let project;
@@ -60,7 +60,7 @@ exports.dest = function(opts) {
6060

6161
exports.clearCache = function() {
6262
// delete cache folder outside of cwd
63-
return del(cacheDir, {force: true});
63+
return fs.promises.rm(cacheDir, { recursive: true, force: true });
6464
};
6565

6666
function buildLoaderConfig(p) {

lib/build/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ exports.getCache = function(hash) {
5858
const filePath = cachedFilePath(hash);
5959
try {
6060
return JSON.parse(fs.readFileSync(filePath));
61-
} catch (e) {
61+
} catch {
6262
// ignore
6363
}
6464
};

lib/cli-options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function definedEnvironments() {
66
let files;
77
try {
88
files = fs.readdirSync('aurelia_project/environments');
9-
} catch (e) {
9+
} catch {
1010
// ignore
1111
}
1212
files && files.forEach(file => {

lib/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ exports.CLI = class {
7878
// need to configure logger after getting args
7979
this.configureLogger();
8080
resolve(found);
81-
} catch (e) {
81+
} catch {
8282
if (this.project) {
8383
this.project.resolveTask(commandModule).then(taskPath => {
8484
if (taskPath) {

lib/file-system.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ exports.statSync = function(path) {
103103
exports.isFile = function(path) {
104104
try {
105105
return fs.statSync(path).isFile();
106-
} catch (err) {
106+
} catch {
107107
// ignore
108108
return false;
109109
}
@@ -112,7 +112,7 @@ exports.isFile = function(path) {
112112
exports.isDirectory = function(path) {
113113
try {
114114
return fs.statSync(path).isDirectory();
115-
} catch (err) {
115+
} catch {
116116
// ignore
117117
return false;
118118
}

lib/package-managers/base-package-manager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ exports.BasePackageManager = class {
3131
getExecutablePath(directory) {
3232
try {
3333
return npmWhich(directory).sync(this.executableName);
34-
} catch (e) {
34+
} catch {
3535
return null;
3636
}
3737
}

lib/project.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function installBabel() {
109109
configFile: false,
110110
plugins: [
111111
['@babel/plugin-proposal-decorators', { legacy: true }],
112-
['@babel/plugin-proposal-class-properties', { loose: true }],
112+
['@babel/plugin-transform-class-properties', { loose: true }],
113113
['@babel/plugin-transform-modules-commonjs', {loose: true}]
114114
],
115115
only: [/aurelia_project/]

package.json

+34-34
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"lint": "eslint lib spec",
2121
"pretest": "npm run lint",
2222
"test": "jasmine",
23-
"coverage": "nyc jasmine",
23+
"coverage": "c8 jasmine",
2424
"test:watch": "nodemon -x 'npm test'",
2525
"preversion": "npm test",
2626
"version": "standard-changelog && git add CHANGELOG.md",
@@ -38,64 +38,64 @@
3838
"url": "https://github.com/aurelia/cli"
3939
},
4040
"dependencies": {
41-
"@babel/core": "^7.18.2",
42-
"@babel/plugin-proposal-class-properties": "^7.17.12",
43-
"@babel/plugin-proposal-decorators": "^7.18.2",
44-
"@babel/plugin-transform-modules-amd": "^7.18.0",
45-
"@babel/plugin-transform-modules-commonjs": "^7.18.2",
46-
"@babel/register": "^7.17.7",
41+
"@babel/core": "^7.26.0",
42+
"@babel/plugin-proposal-decorators": "^7.25.9",
43+
"@babel/plugin-transform-class-properties": "^7.25.9",
44+
"@babel/plugin-transform-modules-amd": "^7.25.9",
45+
"@babel/plugin-transform-modules-commonjs": "^7.25.9",
46+
"@babel/register": "^7.25.9",
4747
"ansi-colors": "^4.1.3",
48-
"assert": "^2.0.0",
49-
"aurelia-dependency-injection": "^1.5.2",
48+
"assert": "^2.1.0",
49+
"aurelia-dependency-injection": "^1.6.1",
5050
"aurelia-logging": "^1.5.2",
5151
"aurelia-polyfills": "^1.3.4",
5252
"browserify-zlib": "^0.2.0",
53-
"buffer": "^5.7.0",
53+
"buffer": "^6.0.3",
5454
"concat-with-sourcemaps": "^1.1.0",
5555
"console-browserify": "^1.2.0",
5656
"constants-browserify": "^1.0.0",
57-
"convert-source-map": "^1.8.0",
58-
"crypto-browserify": "^3.12.0",
59-
"del": "^6.1.1",
60-
"domain-browser": "^4.22.0",
61-
"enquirer": "^2.3.6",
57+
"convert-source-map": "^2.0.0",
58+
"crypto-browserify": "^3.12.1",
59+
"domain-browser": "^5.7.0",
60+
"enquirer": "^2.4.1",
6261
"events": "^3.3.0",
6362
"fs-browser-stub": "^1.0.1",
64-
"gulp": "^4.0.2",
65-
"htmlparser2": "^8.0.1",
63+
"gulp": ">=4.0.2",
64+
"htmlparser2": "^9.1.0",
6665
"https-browserify": "^1.0.0",
6766
"lodash": "^4.17.21",
6867
"map-stream": "0.0.7",
69-
"meriyah": "^4.2.1",
70-
"minimatch": "^5.1.0",
68+
"meriyah": "^6.0.2",
69+
"minimatch": "^10.0.1",
7170
"npm-which": "^3.0.1",
7271
"os-browserify": "^0.3.0",
7372
"path-browserify": "1.0.1",
7473
"process": "^0.11.10",
75-
"punycode": "^2.1.1",
74+
"punycode": "^2.3.1",
7675
"querystring-browser-stub": "^1.0.0",
77-
"readable-stream": "^3.6.0",
78-
"resolve": "^1.22.0",
79-
"semver": "^7.3.7",
76+
"readable-stream": "^4.5.2",
77+
"resolve": "^1.22.8",
78+
"semver": "^7.6.3",
8079
"stream-browserify": "^3.0.0",
8180
"stream-http": "^3.2.0",
8281
"string_decoder": "^1.3.0",
83-
"terser": "^5.14.0",
82+
"terser": "^5.36.0",
8483
"timers-browserify": "^2.0.12",
8584
"tty-browserify": "0.0.1",
86-
"typescript": "^4.7.3",
87-
"url": "^0.11.0",
88-
"util": "^0.12.4",
85+
"typescript": "^5.6.3",
86+
"url": "^0.11.4",
87+
"util": "^0.12.5",
8988
"vm-browserify": "^1.1.2"
9089
},
9190
"devDependencies": {
92-
"@types/node": "^17.0.39",
93-
"eslint": "^8.17.0",
94-
"jasmine": "^4.1.0",
91+
"@types/node": "^22.8.1",
92+
"c8": "^10.1.2",
93+
"eslint": "^9.13.0",
94+
"globals": "^15.11.0",
95+
"jasmine": "^5.4.0",
9596
"jasmine-spec-reporter": "^7.0.0",
96-
"nodemon": "^2.0.16",
97-
"nyc": "^15.1.0",
98-
"standard-changelog": "^2.0.27",
99-
"yargs": "^17.5.1"
97+
"nodemon": "^3.1.7",
98+
"standard-changelog": "^6.0.0",
99+
"yargs": "^17.7.2"
100100
}
101101
}

spec/lib/build/dependency-inclusion.spec.js

-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ describe('the DependencyInclusion module', () => {
183183
lazyMain: true
184184
};
185185

186-
// eslint-disable-next-line no-unused-vars
187186
let sut = new DependencyInclusion(bundle, description);
188187

189188
sut.traceResources()

0 commit comments

Comments
 (0)