-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite a build process. Use external bundler grisaia-package-builder…
…. Reduce scripts and config amount. Fix eslint + prettier setup. Fix global types declarations.
- Loading branch information
Liakhovskyi Vladyslav
committed
Sep 14, 2023
1 parent
055d4dd
commit ea3074d
Showing
43 changed files
with
9,352 additions
and
8,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
"react-grecaptcha-v3": patch | ||
'react-grecaptcha-v3': patch | ||
--- | ||
|
||
Reduce complexity of build process. Gracefully reduce amount of dependenciec and package.json file size. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
"react-grecaptcha-v3": patch | ||
'react-grecaptcha-v3': patch | ||
--- | ||
|
||
Reduced .eslintrc config size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
"react-grecaptcha-v3": patch | ||
'react-grecaptcha-v3': patch | ||
--- | ||
|
||
Unnecesarry config removed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
"react-grecaptcha-v3": patch | ||
'react-grecaptcha-v3': patch | ||
--- | ||
|
||
Reduce scripts amount. Be eloquent in this question. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
"react-grecaptcha-v3": patch | ||
'react-grecaptcha-v3': patch | ||
--- | ||
|
||
Upgrade rimraf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
"react-grecaptcha-v3": patch | ||
'react-grecaptcha-v3': patch | ||
--- | ||
|
||
Fixed typo in Readme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,40 @@ | ||
{ | ||
"ignorePatterns": [ | ||
"node_modules/", | ||
"dist/", | ||
"coverage/", | ||
"benchmark/", | ||
"scripts/", | ||
"docs/" | ||
], | ||
"parserOptions": { | ||
"project": ["./tsconfig.json","./__tests__/tsconfig.json"] | ||
}, | ||
"extends": ["eslint-config-grisaia-react", "eslint-config-grisaia-typescript","prettier"], | ||
"plugins": [ "prettier"], | ||
"rules": { | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": ["warn", "error"] | ||
} | ||
"ignorePatterns": [ | ||
"node_modules/", | ||
"dist/", | ||
"coverage/", | ||
"benchmark/", | ||
"scripts/", | ||
"docs/" | ||
], | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"arrowParens": "avoid", | ||
"trailingComma": "es5" | ||
} | ||
"parserOptions": { | ||
"project": ["./tsconfig.json", "./__tests__/tsconfig.json"] | ||
}, | ||
"extends": [ | ||
"eslint-config-grisaia-react", | ||
"eslint-config-grisaia-typescript", | ||
"prettier" | ||
], | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": ["warn", "error"] | ||
} | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.test.ts", "*.test.tsx", "*.spec.ts", "*.spec.tsx"], | ||
"globals": { | ||
"vi": true | ||
}, | ||
"rules": { | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"react-hooks/rules-of-hooks": "off", | ||
"react-hooks/exhaustive-deps": "off" | ||
} | ||
} | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.test.ts", "*.test.tsx", "*.spec.ts", "*.spec.tsx"], | ||
"globals": { | ||
"vi": true | ||
}, | ||
"rules": { | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"react-hooks/rules-of-hooks": "off", | ||
"react-hooks/exhaustive-deps": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
env: | ||
# We only install Chromium manually | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' | ||
# We only install Chromium manually | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' | ||
|
||
jobs: | ||
Tests: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
include: | ||
- node-version: 16 | ||
os: ubuntu-latest | ||
- node-version: 16 | ||
os: windows-latest | ||
- node-version: 16 | ||
os: macOS-latest | ||
- node-version: 18 | ||
os: ubuntu-latest | ||
- node-version: 20 | ||
os: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm test | ||
env: | ||
CI: true | ||
Lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: pnpm | ||
- run: 'pnpm i && pnpm lint && pnpm test' | ||
Tests: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
include: | ||
- node-version: 16 | ||
os: ubuntu-latest | ||
- node-version: 16 | ||
os: windows-latest | ||
- node-version: 16 | ||
os: macOS-latest | ||
- node-version: 18 | ||
os: ubuntu-latest | ||
- node-version: 20 | ||
os: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm test | ||
env: | ||
CI: true | ||
Lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: pnpm | ||
- run: 'pnpm i && pnpm lint && pnpm test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: {} | ||
jobs: | ||
release: | ||
# prevents this action from running on forks | ||
if: github.repository == 'RustedLabs/react-grecaptcha-v3' | ||
permissions: | ||
contents: write # to create release (changesets/action) | ||
pull-requests: write # to create pull request (changesets/action) | ||
id-token: write | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
- uses: pnpm/[email protected] | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
cache: pnpm | ||
release: | ||
# prevents this action from running on forks | ||
if: github.repository == 'RustedLabs/react-grecaptcha-v3' | ||
permissions: | ||
contents: write # to create release (changesets/action) | ||
pull-requests: write # to create pull request (changesets/action) | ||
id-token: write | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
- uses: pnpm/[email protected] | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
cache: pnpm | ||
|
||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm changeset:version | ||
publish: pnpm changeset:publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm changeset:version | ||
publish: pnpm changeset:publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"semi": false, | ||
"singleQuote": true, | ||
"arrowParens": "avoid" | ||
} |
Oops, something went wrong.