Skip to content

Commit

Permalink
chore: update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhen Wang committed Aug 14, 2024
1 parent 7b0febc commit ae27e73
Show file tree
Hide file tree
Showing 28 changed files with 25,230 additions and 17,651 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 16.x
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'
- name: Install dependencies
run: |
yarn install
Expand All @@ -29,16 +29,16 @@ jobs:
- name: Publish to Chrome
uses: trmcnvn/chrome-addon@v2
with:
extension: ${{ secrets.GWE_EXTENSION_ID }}
extension: ${ secrets.GWE_EXTENSION_ID }
zip: packages/web-extension/dist/web-extension.zip
client-id: ${{ secrets.GWE_PUBLISH_CLIENT_ID }}
client-secret: ${{ secrets.GWE_PUBLISH_CLIENT_SECRET }}
refresh-token: ${{ secrets.GWE_PUBLISH_REFRESH_TOKEN }}
client-id: ${ secrets.GWE_PUBLISH_CLIENT_ID }
client-secret: ${ secrets.GWE_PUBLISH_CLIENT_SECRET }
refresh-token: ${ secrets.GWE_PUBLISH_REFRESH_TOKEN }
- name: Publish to Firefox
uses: trmcnvn/firefox-addon@v1
with:
uuid: ${{ secrets.FWE_UUID }}
uuid: ${ secrets.FWE_UUID }
xpi: packages/web-extension/dist/web-extension.zip
manifest: packages/web-extension/dist/manifest.json
api-key: ${{ secrets.FWE_API_KEY }}
api-secret: ${{ secrets.FWE_PUBLISH_SECRET }}
api-key: ${ secrets.FWE_API_KEY }
api-secret: ${ secrets.FWE_PUBLISH_SECRET }
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.15.1
22.6.0
Binary file added .yarn/install-state.gz
Binary file not shown.
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.4.0.cjs
5 changes: 2 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"version": "2.3.3",
"npmClient": "yarn",
"useWorkspaces": true
"version": "8.1.8",
"npmClient": "yarn"
}
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"test": "lerna run test --stream"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"husky": "^4.3.0",
"lerna": "^3.22.1",
"lint-staged": "^10.4.2",
"rimraf": "^3.0.2"
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"husky": "^9.1.4",
"lerna": "^8.1.8",
"lint-staged": "^15.2.9",
"rimraf": "^6.0.1"
},
"engines": {
"node": ">=12.x"
"node": ">=18.x"
},
"license": "Apache-2.0",
"author": "IBM",
Expand Down Expand Up @@ -97,5 +97,6 @@
"!(*sass).md": [
"prettier --write"
]
}
},
"packageManager": "[email protected]"
}
3 changes: 0 additions & 3 deletions packages/component-list/.eslintignore

This file was deleted.

41 changes: 41 additions & 0 deletions packages/component-list/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import path from 'path';
import { fileURLToPath } from 'url';

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});

export default [
// mimic ESLintRC-style extends
...compat.extends('carbon'),
{
files: ['src/**/*.js'],
ignores: ['node_modules', '*.log', 'dist'],
languageOptions: {
globals: {
chrome: 'readonly',
},
},
rules: {
"no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
]
}
},
];
50 changes: 22 additions & 28 deletions packages/component-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"format": "prettier --write '*.{js,json,md,scss,ts}' '**/*.{js,json,md,scss,ts}' '!**/{dist,build,es,lib,storybook,ts,umd}/**' '!**/*.{jpg,jpeg,gif,png}'",
"format:diff": "prettier --list-different '*.{js,json,md,scss,ts}' '**/*.{js,json,md,scss,ts}' '!**/{dist,build,es,lib,storybook,ts,umd}/**' '!**/*.{jpg,jpeg,gif,png}'",
"lint": "yarn lint:js",
"lint:js": "eslint . --ext .js",
"lint:js": "eslint src/",
"test": "yarn format && yarn lint"
},
"dependencies": {
Expand All @@ -26,35 +26,29 @@
"carbon-web-components": "^1.16.2"
},
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/node": "^7.15.4",
"@babel/preset-env": "^7.15.6",
"@babel/preset-react": "^7.14.5",
"@testing-library/react": "^12.1.0",
"babel-loader": "^8.2.2",
"cheerio": "1.0.0-rc.10",
"@babel/core": "^7.25.2",
"@babel/node": "^7.25.0",
"@babel/preset-env": "^7.25.3",
"@babel/preset-react": "^7.24.7",
"@testing-library/react": "^16.0.0",
"babel-loader": "^9.1.3",
"babel-preset-carbon": "^0.0.14",
"cheerio": "1.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"eslint": "^7.12.0",
"eslint-config-carbon": "^2.1.0",
"enzyme-adapter-react-16": "^1.15.8",
"eslint": "^9.9.0",
"eslint-config-carbon": "^3.14.0",
"global": "^4.4.0",
"nodemon": "^2.0.13",
"prettier": "^2.7.1",
"postcss": "^8.4.18",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"stylelint": "^14.3.0",
"stylelint-config-carbon": "^1.2.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12"
},
"eslintConfig": {
"extends": [
"carbon"
],
"globals": {
"chrome": "readonly"
}
"nodemon": "^3.1.4",
"postcss": "^8.4.41",
"prettier": "^3.3.3",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"rimraf": "^6.0.1",
"stylelint": "^16.8.1",
"stylelint-config-carbon": "^1.17.0",
"webpack": "^5.93.0",
"webpack-cli": "^5.1.4"
},
"stylelint": {
"extends": [
Expand Down
12 changes: 6 additions & 6 deletions packages/component-list/src/helpers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { configure, shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import cheerio from 'cheerio';
import * as cheerio from 'cheerio';

configure({ adapter: new Adapter() });

Expand Down Expand Up @@ -59,29 +59,29 @@ function buildReactComponentList(
// 1. try a simple shallow render
try {
shallowComp = shallow(<Comp {...mockedProps} />);
} catch (e) {
} catch (_e) {
// 2. try it with children
try {
shallowComp = shallow(
<Comp key="children">
<li>...</li>
</Comp>
);
} catch (e) {
} catch (_e) {
for (let i = 0; i < customShallowComps.length; i++) {
// 3. try any custom shallow renders
try {
shallowComp = shallow(customShallowComps[i](Comp));
break;
} catch (e) {
} catch (_e) {
// do nothing if it fails until a little later
}
}
}
}

attr = shallowComp.props();
className = attr && attr.className;
className = attr?.className;

if (!className) {
// try cheerio
Expand All @@ -105,7 +105,7 @@ function buildReactComponentList(
console.log(`${prefix}${compKey}: Failed to find a unique identifier.`);
fail();
}
} catch (error) {
} catch (_error) {
console.log(`${prefix}${compKey}: Failed to render.`);
fail();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/component-list/webpack.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const webpack = require('webpack'); // eslint-disable-line no-unused-vars
const webpack = require('webpack');
const path = require('path');

module.exports = {
Expand Down
3 changes: 0 additions & 3 deletions packages/utilities/.eslintignore

This file was deleted.

41 changes: 41 additions & 0 deletions packages/utilities/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import path from 'path';
import { fileURLToPath } from 'url';

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});

export default [
// mimic ESLintRC-style extends
...compat.extends('carbon'),
{
files: ['src/**/*.js'],
ignores: ['node_modules', '*.log', 'dist'],
languageOptions: {
globals: {
chrome: 'readonly',
},
},
rules: {
"no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
]
}
},
];
10 changes: 5 additions & 5 deletions packages/utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"format": "prettier --write '*.{js,json,md,scss,ts}' '**/*.{js,json,md,scss,ts}' '!**/{dist,build,es,lib,storybook,ts,umd}/**' '!**/*.{jpg,jpeg,gif,png}'",
"format:diff": "prettier --list-different '*.{js,json,md,scss,ts}' '**/*.{js,json,md,scss,ts}' '!**/{dist,build,es,lib,storybook,ts,umd}/**' '!**/*.{jpg,jpeg,gif,png}'",
"lint": "yarn lint:js",
"lint:js": "eslint . --ext .js",
"lint:js": "eslint src/",
"test": "yarn format && yarn lint"
},
"keywords": [
Expand Down Expand Up @@ -35,10 +35,10 @@
"@carbon/layout": "^10.29.0"
},
"devDependencies": {
"eslint": "^7.12.0",
"eslint-config-carbon": "^2.1.0",
"prettier": "^2.7.1",
"prettier-config-carbon": "^0.8.0"
"eslint": "^9.9.0",
"eslint-config-carbon": "^3.14.0",
"prettier": "^2.8.8",
"prettier-config-carbon": "^0.11.0"
},
"eslintConfig": {
"extends": [
Expand Down
3 changes: 0 additions & 3 deletions packages/web-extension/.eslintignore

This file was deleted.

43 changes: 43 additions & 0 deletions packages/web-extension/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import path from 'path';
import { fileURLToPath } from 'url';

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});

export default [
// mimic ESLintRC-style extends
...compat.extends('carbon'),
{
files: ['src/**/*.js'],
ignores: ['node_modules', '*.log', 'dist'],
languageOptions: {
globals: {
chrome: 'readonly',
},
},
rules: {
"no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"react/forbid-component-props": "warn",
"react/forbid-dom-props": "warn",
}
},
];
Loading

0 comments on commit ae27e73

Please sign in to comment.