diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index 845c6ea..f50fbbb 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -6,12 +6,14 @@ on: paths-ignore: - '.devcontainer/**' - '.github/**' + workflow_dispatch: {} jobs: call-workflow: permissions: - pages: write + contents: write id-token: write + pages: write secrets: inherit uses: compulim/workflows/.github/workflows/continuous-deployment.yml@main with: diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml new file mode 100644 index 0000000..53e0965 --- /dev/null +++ b/.github/workflows/prepare-release.yml @@ -0,0 +1,12 @@ +name: Prepare release + +on: + workflow_dispatch: {} + +jobs: + call-workflow: + permissions: + contents: write + id-token: write + secrets: inherit + uses: compulim/workflows/.github/workflows/prepare-release.yml@main diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index e16addf..63f6fb9 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -1,8 +1,8 @@ -name: Publish release on push tag +name: Publish release on: - push: - tags: 'v*' + release: + types: [created] jobs: call-workflow: @@ -14,3 +14,4 @@ jobs: uses: compulim/workflows/.github/workflows/publish-release.yml@main with: package-name: use-ref-from + tag: ${{ github.ref_name }} diff --git a/package-lock.json b/package-lock.json index c48183b..3c12f18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9540,6 +9540,7 @@ "devDependencies": { "@babel/core": "^7.22.17", "@babel/preset-env": "^7.22.15", + "@babel/preset-react": "^7.22.15", "@testing-library/react": "^14.0.0", "@types/react": "^18.2.21", "jest": "^29.6.4", diff --git a/packages/integration-test/.eslintrc.yml b/packages/integration-test/.eslintrc.yml new file mode 100644 index 0000000..feb2088 --- /dev/null +++ b/packages/integration-test/.eslintrc.yml @@ -0,0 +1,3 @@ +extends: + - ../../.eslintrc.react.yml + - ../../.eslintrc.jest.yml diff --git a/packages/integration-test/babel.config.json b/packages/integration-test/babel.config.json index 504c7ec..29970b7 100644 --- a/packages/integration-test/babel.config.json +++ b/packages/integration-test/babel.config.json @@ -1,5 +1,6 @@ { "presets": [ + "@babel/preset-react", [ "@babel/preset-env", { diff --git a/packages/integration-test/package.json b/packages/integration-test/package.json index cff738a..c788553 100644 --- a/packages/integration-test/package.json +++ b/packages/integration-test/package.json @@ -8,7 +8,7 @@ "bump:auditfix": "npm audit fix || exit 0", "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .devDependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .dependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", - "precommit": "eslint --ext .js,.cjs,.mjs,.ts,.cts,.mts ./", + "precommit": "eslint --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts ./", "test": "jest" }, "author": "William Wong (https://github.com/compulim)", @@ -19,6 +19,7 @@ "devDependencies": { "@babel/core": "^7.22.17", "@babel/preset-env": "^7.22.15", + "@babel/preset-react": "^7.22.15", "@testing-library/react": "^14.0.0", "@types/react": "^18.2.21", "jest": "^29.6.4", diff --git a/packages/pages/.gitignore b/packages/pages/.gitignore index 97105ff..eab9b2f 100644 --- a/packages/pages/.gitignore +++ b/packages/pages/.gitignore @@ -1,3 +1,2 @@ /node_modules/ -/package-lock.json /public/static/ diff --git a/packages/pages/src/tsconfig.json b/packages/pages/src/tsconfig.json index 1025679..4ac3c0b 100644 --- a/packages/pages/src/tsconfig.json +++ b/packages/pages/src/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "esModuleInterop": true, "jsx": "react", - "lib": ["DOM", "ESNext"], + "lib": ["DOM", "ESNext", "WebWorker"], "moduleResolution": "Bundler", "noEmit": true, "strict": true, diff --git a/packages/use-ref-from/.gitignore b/packages/use-ref-from/.gitignore index dbe80ef..41db92f 100644 --- a/packages/use-ref-from/.gitignore +++ b/packages/use-ref-from/.gitignore @@ -1,7 +1,7 @@ /.env /*.tgz /CHANGELOG.md -/lib +/lib/ /LICENSE -/node_modules +/node_modules/ /README.md diff --git a/packages/use-ref-from/babel.jest.config.json b/packages/use-ref-from/babel.jest.config.json index b24488c..6272738 100644 --- a/packages/use-ref-from/babel.jest.config.json +++ b/packages/use-ref-from/babel.jest.config.json @@ -6,7 +6,7 @@ "@babel/preset-env", { "modules": "commonjs", - "targets": { "node": "16" } + "targets": { "node": "18" } } ] ],