Skip to content

Commit

Permalink
Update webextension's packages and fix code for Node.js 16 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
massongit authored Nov 24, 2024
1 parent 0ee1f51 commit ce2cefe
Show file tree
Hide file tree
Showing 6 changed files with 1,619 additions and 2,351 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [ 18, 20, 22 ]
node-version: [ 16, 18, 20, 22 ]
os: [ ubuntu-latest, windows-latest ]
steps:
- name: checkout
Expand All @@ -22,5 +22,11 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Build
run: yarn run build
- name: Build webextension (Chrome)
run: npm run dist chrome
if: matrix.node-version == 16
working-directory: packages/webextension
- name: Test
run: yarn test
2 changes: 1 addition & 1 deletion packages/@textlint/script-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/node": "^18.13.0",
"@types/webpack": "^4.41.26",
"@types/webpack": "^5.28.5",
"mocha": "^8.4.0",
"prettier": "^2.3.0",
"textlint-rule-no-dropping-the-ra": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const useForm = (props: ScriptMetaProps) => {
} catch (error) {
return {
...prevState,
textlintrc: error
textlintrc: error instanceof Error ? error : null
};
}
});
Expand Down
12 changes: 7 additions & 5 deletions packages/webextension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
"@types/reach__router": "^1.3.6",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"copy-webpack-plugin": "^7.0.0",
"css-loader": "^5.0.1",
"copy-webpack-plugin": "9.0.1",
"css-loader": "^6.11.0",
"path-browserify": "^1.0.1",
"style-loader": "^1.2.1",
"ts-loader": "^8.0.14",
"webextension-toolbox": "^3.0.0",
"webpack": "^4.44.0",
"ts-loader": "^8.4.0",
"webextension-toolbox": "^4.0.3",
"webpack": "5.42.0",
"webpack-sources": "^2.3.0",
"webpack-watched-glob-entries-plugin": "^2.1.9"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
// Add typescript loader. supports .ts and .tsx files as entry points
config.resolve.extensions.push(".ts");
config.resolve.extensions.push(".tsx");
config.resolve.fallback = { path: require.resolve("path-browserify") };
config.entry = GlobEntriesPlugin.getEntries([
path.resolve("app", "*.{js,mjs,jsx,ts,tsx}"),
path.resolve("app", "?(scripts)/*.{js,mjs,jsx,ts,tsx}")
Expand Down
Loading

0 comments on commit ce2cefe

Please sign in to comment.