Skip to content

Commit

Permalink
feat: simplify tooling (#1531)
Browse files Browse the repository at this point in the history
* chore: add yarn cache in GH actions

* chore: upgrade to yarn 3.6.3

* chore: yarn dedupe

* chore: remove jest-chrome

* feat: update eslint

* chore: update ignore files

* chore: remove jest references

* chore: remove ts-node

* chore: upgrade vite and vitest
  • Loading branch information
kratico authored Sep 12, 2023
1 parent 57535d9 commit 31237ce
Show file tree
Hide file tree
Showing 18 changed files with 1,160 additions and 3,817 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --immutable
- run: yarn checkResolutions
- run: yarn build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: yarn install --immutable
- run: yarn build
- name: Publish Dry Run
Expand Down
4 changes: 1 addition & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ node_modules/
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/*
.pnp.*

logs
Expand Down
785 changes: 0 additions & 785 deletions .yarn/releases/yarn-3.2.0.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.2.0.cjs
yarnPath: .yarn/releases/yarn-3.6.3.cjs
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"concurrently": "^8.2.0",
"crypto-browserify": "^3.12.0",
"css-loader": "^6.8.1",
"eslint": "^8.44.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-import": "^2.27.5",
Expand All @@ -71,13 +71,12 @@
"regenerator-runtime": "^0.13.11",
"rimraf": "^3.0.2",
"stream-browserify": "^3.0.0",
"ts-node": "^10.9.1",
"typedoc": "^0.24.8",
"typescript": "^5.1.6",
"url-loader": "^4.1.1"
},
"resolutions": {
"@substrate/connect": "0.7.31"
},
"packageManager": "yarn@3.2.0"
"packageManager": "yarn@3.6.3"
}
4 changes: 2 additions & 2 deletions packages/connect-extension-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"clean": "rm -rf dist/ tsconfig.tsbuildinfo",
"build": "tsc -p tsconfig-mjs.json && tsc -p tsconfig-cjs.json && bash ./fix-package-type.sh",
"test": "exit 0; #This package is only types",
"lint": "yarn eslint . --ext .js,.ts"
"lint": "eslint . --ext .js,.ts"
},
"devDependencies": {
"eslint": "^8.44.0"
"eslint": "^8.48.0"
}
}
5 changes: 2 additions & 3 deletions packages/connect/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ coverage
# don't lint .cache
.chains

/src/specs/*.json
/src/connector/specs/*.ts
jest.*.ts
src/connector/specs/*.json
src/connector/specs/js/*.ts
1 change: 0 additions & 1 deletion packages/connect/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ yarn-error.log*
/coverage
tsconfig.*
extension-resolver.cjs
jest.config*

fix-package-type.sh
6 changes: 3 additions & 3 deletions packages/connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
"build": "yarn run build:mjs && yarn run build:cjs && bash ./fix-package-type.sh",
"build:mjs": "tsc -b tsconfig-mjs.json",
"build:cjs": "tsc -b tsconfig-cjs.json",
"lint": "yarn eslint . --ext .js,.ts"
"lint": "eslint . --ext .js,.ts"
},
"dependencies": {
"@substrate/connect-extension-protocol": "^1.0.1",
"smoldot": "2.0.1"
},
"devDependencies": {
"eslint": "^8.44.0",
"vitest": "^0.33.0"
"eslint": "^8.48.0",
"vitest": "^0.34.3"
}
}
1 change: 0 additions & 1 deletion packages/connect/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
},
"exclude": [
"**/*.test.ts",
"jest.config*",
"tsconfig*",
"*node_modules*",
"../../node_modules*"
Expand Down
4 changes: 2 additions & 2 deletions projects/burnr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
},
"devDependencies": {
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.44.0",
"vite": "^4.4.3",
"eslint": "^8.48.0",
"vite": "^4.4.9",
"vite-plugin-html": "^3.2.0"
}
}
3 changes: 1 addition & 2 deletions projects/burnr/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ export default defineConfig({
outDir: "../dist",
},
plugins: [
// …
react({
// Use React plugin in all *.jsx and *.tsx files
include: "**/*.{jsx,tsx, js, ts}",
include: "**/*.{jsx,tsx,js,ts}",
}),
],
})
6 changes: 3 additions & 3 deletions projects/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dev": "yarn clean && yarn copy-assets && vite serve",
"preview": "vite preview",
"test": "exit 0; #No tests",
"lint": "yarn eslint . --ext .ts,.tsx"
"lint": "eslint . --ext .ts,.tsx"
},
"dependencies": {
"@polkadot/api": "^10.9.1",
Expand All @@ -26,8 +26,8 @@
},
"devDependencies": {
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.44.0",
"vite": "^4.4.4",
"eslint": "^8.48.0",
"vite": "^4.4.9",
"vite-plugin-html": "^3.2.0"
}
}
3 changes: 0 additions & 3 deletions projects/extension/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ dist
# don't lint .cache
.cache

jest-setup.js
jest.config.ts
webpack.*
/public/assets/*.json
7 changes: 3 additions & 4 deletions projects/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dev:m2": "yarn run clean && yarn run prep:m2 && webpack --node-env development --config webpack.dev.js",
"start": "web-ext run --source-dir ./dist -t chromium",
"start:firefox": "web-ext run --source-dir ./dist -t firefox-desktop",
"lint": "yarn eslint . --ext .js,.jsx,.ts,.tsx",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"bundle": "yarn run bundle:m3 && yarn run bundle:m2",
"bundle:m3": "cp tsconfig.json tsconfig_bkp.json && mv tsconfig.ext.json tsconfig.json && yarn run clean && rm -rf node_modules && zip -r substrate-connect_source-code.zip . -x 'node_modules/*' 'dist/*' 'tsconfig_bkp.json' && mv tsconfig_bkp.json tsconfig.json && mv substrate-connect_m3-source-code.zip ../..",
"bundle:m2": "cp tsconfig.json tsconfig_bkp.json && mv tsconfig.ext.json tsconfig.json && yarn run clean && rm -rf node_modules && zip -r substrate-connect_source-code.zip . -x 'node_modules/*' 'dist/*' 'tsconfig_bkp.json' && mv tsconfig_bkp.json tsconfig.json && mv substrate-connect_m2-source-code.zip ../.."
Expand All @@ -32,18 +32,17 @@
"autoprefixer": "^10.4.14",
"copy-webpack-plugin": "^10.2.4",
"css-loader": "^6.8.1",
"eslint": "^8.44.0",
"eslint": "^8.48.0",
"html-minimizer-webpack-plugin": "^4.3.0",
"html-webpack-plugin": "^5.5.3",
"jest-chrome": "^0.7.2",
"mini-css-extract-plugin": "^2.7.6",
"postcss": "^8.4.25",
"postcss-loader": "^7.3.3",
"style-loader": "^3.3.3",
"tailwindcss": "^3.3.2",
"ts-loader": "^9.4.3",
"typescript": "^5.1.6",
"vitest": "^0.33.0",
"vitest": "^0.34.3",
"web-ext": "^7.6.2",
"webpack": "^5.86.0",
"webpack-cli": "^4.10.0",
Expand Down
Loading

0 comments on commit 31237ce

Please sign in to comment.