Skip to content

Commit

Permalink
Merge pull request #113 from aurelia/dep
Browse files Browse the repository at this point in the history
chore: upgrade deps and eslint v9
  • Loading branch information
3cp authored Oct 9, 2024
2 parents 4613491 + c9eb9af commit 54aea18
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 79 deletions.
8 changes: 4 additions & 4 deletions babel/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.24.1",
"@babel/plugin-proposal-decorators": "^7.25.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/core": "^7.24.3",
"@babel/core": "^7.25.7",
// @if !parcel
"@babel/preset-env": "^7.24.3",
"@babel/preset-env": "^7.25.7",
// @endif
// @if parcel
"@parcel/babel-preset-env": "^2.12.0",
// @endif
"@babel/eslint-parser": "^7.24.1"
"@babel/eslint-parser": "^7.25.7"
}
}
32 changes: 0 additions & 32 deletions common/.eslintrc.json

This file was deleted.

42 changes: 42 additions & 0 deletions common/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import eslint from "@eslint/js";
// @if babel
import babelParser from "@babel/eslint-parser";
// @endif
// @if typescript
import tseslint from 'typescript-eslint';
import tsParser from "@typescript-eslint/parser";
// @endif
import globals from "globals";

export default [
eslint.configs.recommended,
// @if typescript
...tseslint.configs.recommended,
// @endif
{
// @if typescript
files: ["**/*.ts"],
// @endif

languageOptions: {
globals: {
...globals.builtin,
...globals.nodeBuiltin,
...globals.browser,
...globals.node,
// @if jest
...globals.jest,
// @endif
},

// @if babel
parser: babelParser,
// @endif
// @if typescript
parser: tsParser,
// @endif
ecmaVersion: 2019,
sourceType: "module",
},
}
];
9 changes: 5 additions & 4 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
// @endif
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint": "^9.12.0",
"globals": "^15.10.0",
"@aurelia/testing": /* @if latest */"latest"/* @endif *//* @if dev */"dev"/* @endif */,
"stylelint": "^16.3.1",
"stylelint": "^16.9.0",
// @if css
"stylelint-config-standard": "^36.0.0",
"stylelint-config-standard": "^36.0.1",
// @endif
// @if sass
"stylelint-config-standard-scss": "^13.1.0",
Expand All @@ -40,7 +41,7 @@
// @endif
},
"scripts": {
"lint:js": "eslint src/* @if !no-unit-tests */ test/* @endif *//* @if playwright */ e2e/* @endif *//* @if typescript */ --ext .js,.ts/* @endif */",
"lint:js": "eslint src/* @if !no-unit-tests */ test/* @endif *//* @if playwright */ e2e/* @endif */",
// @if css
"lint:css": "stylelint \"src/**/*.css\"",
// @endif
Expand Down
12 changes: 6 additions & 6 deletions dumber/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"devDependencies": {
"@aurelia/plugin-gulp": /* @if latest */"latest"/* @endif *//* @if dev */"dev"/* @endif */,
"gulp": "^4.0.2",
"gulp-dumber": "^2.0.0",
"gulp-dumber": "^3.0.0",
// @if babel
"gulp-babel": "^8.0.0",
// @endif
Expand All @@ -18,8 +18,8 @@
"connect": "^3.7.0",
"connect-history-api-fallback": "^2.0.0",
"connect-injector": "^0.4.4",
"serve-static": "^1.15.0",
"socket.io": "^4.7.5",
"serve-static": "^1.16.2",
"socket.io": "^4.8.0",
"open": "^8.4.2",

"cross-env": "^7.0.3",
Expand All @@ -31,8 +31,8 @@
"node-sass-package-importer": "^5.3.3",
// @endif
"gulp-postcss": "^10.0.0",
"postcss": "^8.4.38",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.47",
"autoprefixer": "^10.4.20",
"postcss-url": "^10.1.3",
},
"scripts": {
Expand All @@ -45,6 +45,6 @@
"chokidar": "^3.6.0",
"glob-stream": "^7.0.0",
"glob-parent": "^6.0.2",
"micromatch": "^4.0.5"
"micromatch": "^4.0.8"
}
}
4 changes: 2 additions & 2 deletions e2e-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function run(command, cwd, dataCB, errorCB) {
if (dataCB) {
dataCB(data, () => {
console.log(`-- kill "${command}"`);
killProc(proc);
setTimeout(() => killProc(proc), 500);
});
}
});
Expand All @@ -76,7 +76,7 @@ function run(command, cwd, dataCB, errorCB) {
errorCB(data, () => {
console.log(`-- kill "${command}"`);
// process.stderr.write(data);
killProc(proc);
setTimeout(() => killProc(proc), 500);
});
}
})
Expand Down
2 changes: 1 addition & 1 deletion jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@aurelia/babel-jest": /* @if latest */"latest"/* @endif *//* @if dev */"dev"/* @endif */,
// @endif
// @if typescript
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.13",
"@aurelia/ts-jest": /* @if latest */"latest"/* @endif *//* @if dev */"dev"/* @endif */,
// @endif
},
Expand Down
2 changes: 1 addition & 1 deletion playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"devDependencies": {
"@playwright/test": "^1.42.1",
"@playwright/test": "^1.48.0",
},
"scripts": {
"test:e2e": "playwright test"
Expand Down
10 changes: 4 additions & 6 deletions typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"devDependencies": {
"@types/node": "^20.12.3",
// FIXME: typescript v5.5 has issue with our decorator typing
"typescript": "~5.4.5",
"tslib": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0"
"@types/node": "^22.7.5",
"typescript": "^5.6.3",
"tslib": "^2.7.0",
"typescript-eslint": "^8.8.1",
}
}
10 changes: 5 additions & 5 deletions vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"type": "module",
"devDependencies": {
"@aurelia/vite-plugin": /* @if latest */"latest"/* @endif *//* @if dev */"dev"/* @endif */,
"vite": "^5.2.12",
"vite": "^5.4.8",
"vite-plugin-node-polyfills": "^0.22.0",
// @if babel
"vite-plugin-babel": "^1.2.0",
// @endif
// @if typescript && plugin
"vite-plugin-dts": "^3.9.1",
"vite-plugin-dts": "^4.2.3",
// @endif
// @if vitest
"vitest": "^1.6.0",
"jsdom": "^24.1.0",
"vitest": "^2.1.2",
"jsdom": "^25.0.1",
// @endif
// @if sass
"sass": "^1.77.3",
"sass": "^1.79.4",
// @endif
},
"scripts": {
Expand Down
20 changes: 10 additions & 10 deletions webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"devDependencies": {
"webpack": "^5.91.0",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4",
"webpack-dev-server": "^5.1.0",
"html-webpack-plugin": "^5.6.0",
"webpack-bundle-analyzer": "^4.10.1",
"style-loader": "^3.3.4",
"css-loader": "^6.10.0",
"webpack-bundle-analyzer": "^4.10.2",
"style-loader": "^4.0.0",
"css-loader": "^7.1.2",
"dotenv-webpack": "^8.1.0",
"@aurelia/webpack-loader": /* @if !dev */"latest"/* @endif *//* @if dev */"dev"/* @endif */,
// @if babel
"babel-loader": "^9.1.3",
"babel-loader": "^9.2.1",
// @endif
// @if typescript
"ts-loader": "^9.5.1",
// @endif
// @if sass
"sass-loader": "^14.1.1",
"sass": "^1.72.0",
"sass-loader": "^16.0.2",
"sass": "^1.79.4",
// @endif
"postcss-loader": "^8.1.1",
"postcss": "^8.4.38",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.47",
"autoprefixer": "^10.4.20",
// @if plugin
"webpack-node-externals": "^3.0.0",
// @endif
Expand Down
28 changes: 20 additions & 8 deletions webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ const sassLoader = {
};
// @endif

const cssLoader = {
loader: 'css-loader',
options: {
modules: {
// css-loader v7 changed namedExport to follow esModule (true).
// But we need to set it to false in order to have consistent
// behaviour for vite/parcel/webpack skeletons.
namedExport: false
}
}
};

const postcssLoader = {
loader: 'postcss-loader',
options: {
Expand Down Expand Up @@ -95,9 +107,9 @@ module.exports = function(env, { analyze }) {
{ test: /\.(png|svg|jpg|jpeg|gif)$/i, type: 'asset' },
{ test: /\.(woff|woff2|ttf|eot|svg|otf)(\?v=[0-9]\.[0-9]\.[0-9])?$/i, type: 'asset' },
// @if !shadow-dom
{ test: /\.css$/i, use: [ 'style-loader', 'css-loader', postcssLoader ] },
{ test: /\.css$/i, use: [ 'style-loader', cssLoader, postcssLoader ] },
// @if sass
{ test: /\.scss$/i, use: [ 'style-loader', 'css-loader', postcssLoader, sassLoader ] },
{ test: /\.scss$/i, use: [ 'style-loader', cssLoader, postcssLoader, sassLoader ] },
// @endif
// @endif
// @if shadow-dom
Expand All @@ -106,45 +118,45 @@ module.exports = function(env, { analyze }) {
// For style loaded in src/main.js, it's not loaded by style-loader.
// It's for shared styles for shadow-dom only.
issuer: /[/\\]src[/\\]main\.(js|ts)$/,
use: [ 'css-loader', postcssLoader ]
use: [ cssLoader, postcssLoader ]
},
// @if sass
{
test: /\.scss$/i,
// For style loaded in src/main.js, it's not loaded by style-loader.
// It's for shared styles for shadow-dom only.
issuer: /[/\\]src[/\\]main\.(js|ts)$/,
use: [ 'css-loader', postcssLoader, sassLoader ]
use: [ cssLoader, postcssLoader, sassLoader ]
},
// @endif
{
test: /\.css$/i,
// For style loaded in other js/ts files, it's loaded by style-loader.
// They are directly injected to HTML head.
issuer: /(?<![/\\]src[/\\]main)\.(js|ts)$/,
use: [ 'style-loader', 'css-loader', postcssLoader ]
use: [ 'style-loader', cssLoader, postcssLoader ]
},
// @if sass
{
test: /\.scss$/i,
// For style loaded in other js/ts files, it's loaded by style-loader.
// They are directly injected to HTML head.
issuer: /(?<![/\\]src[/\\]main)\.(js|ts)$/,
use: [ 'style-loader', 'css-loader', postcssLoader, sassLoader ]
use: [ 'style-loader', cssLoader, postcssLoader, sassLoader ]
},
// @endif
{
test: /\.css$/i,
// For style loaded in html files, Aurelia will handle it.
issuer: /\.html$/,
use: [ 'css-loader', postcssLoader ]
use: [ cssLoader, postcssLoader ]
},
// @if sass
{
test: /\.scss$/i,
// For style loaded in html files, Aurelia will handle it.
issuer: /\.html$/,
use: [ 'css-loader', postcssLoader, sassLoader ]
use: [ cssLoader, postcssLoader, sassLoader ]
},
// @endif
// @endif
Expand Down

0 comments on commit 54aea18

Please sign in to comment.