-
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.
Merge pull request #78 from inaiat/feat/v7
feat: v7
- Loading branch information
Showing
25 changed files
with
5,724 additions
and
19,451 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,18 +1,40 @@ | ||
name: Publish Package to npmjs | ||
name: Publish | ||
on: | ||
release: | ||
types: [created] | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
node-version: '20' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm publish --access public | ||
|
||
- name: Install corepack | ||
run: npm install -g corepack && corepack enable | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build and test | ||
run: pnpm build && pnpm test | ||
|
||
- name: Publish package | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# - name: Publish package on JSR | ||
# run: pnpm dlx jsr publish | ||
|
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 @@ | ||
pnpm check-commit |
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 +1 @@ | ||
a5a6e7962f19d4d754db2afff78546e392f79b5c | ||
739aa6efb9c96e31554306b4761349550825fb2e |
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
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,26 @@ | ||
{ | ||
"lineWidth": 120, | ||
"typescript": { | ||
"quoteStyle": "preferSingle", | ||
"semiColons": "asi", | ||
"binaryExpression.operatorPosition": "sameLine", | ||
"newLineKind": "auto" | ||
}, | ||
"json": {}, | ||
"markdown": {}, | ||
"includes": [ | ||
"**/*.{ts,mjs,js,json}" | ||
], | ||
"excludes": [ | ||
"**/coverage", | ||
"**/report", | ||
"**/node_modules", | ||
"**/*-lock.json", | ||
"**/dist" | ||
], | ||
"plugins": [ | ||
"https://plugins.dprint.dev/typescript-0.90.4.wasm", | ||
"https://plugins.dprint.dev/json-0.19.2.wasm", | ||
"https://plugins.dprint.dev/markdown-0.17.0.wasm" | ||
] | ||
} |
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,77 @@ | ||
import eslint from '@eslint/js' | ||
import functional from 'eslint-plugin-functional/flat' | ||
import n from 'eslint-plugin-n' | ||
import unicorn from 'eslint-plugin-unicorn' | ||
import tseslint from 'typescript-eslint' | ||
|
||
const customRules = { | ||
'@typescript-eslint/consistent-type-exports': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
'no-console': 'error', | ||
|
||
'capitalized-comments': 'off', | ||
'new-cap': 'off', | ||
'n/no-missing-import': 'off', | ||
'unicorn/prevent-abbreviations': 'off', | ||
|
||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/member-delimiter-style': 'off', | ||
'@typescript-eslint/prefer-readonly-parameter-types': 'off', | ||
'@typescript-eslint/naming-convention': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'warn', | ||
'@typescript-eslint/object-curly-spacing': 'off', | ||
|
||
'n/no-unpublished-import': 'off', | ||
'unicorn/import-style': 'off', | ||
'unicorn/no-array-method-this-argument': 'off', | ||
'unicorn/no-array-callback-reference': 'off', | ||
|
||
'functional/prefer-readonly-type': 'off', | ||
'functional/no-classes': 'off', | ||
'functional/no-return-void': 'off', | ||
'functional/no-let': [ | ||
'error', | ||
{ | ||
'ignoreIdentifierPattern': '^mut(able|.*)_', | ||
}, | ||
], | ||
'functional/immutable-data': [ | ||
'error', | ||
{ | ||
'ignoreIdentifierPattern': '^mut(able|.*)_', | ||
}, | ||
], | ||
} | ||
|
||
const languageOptions = { | ||
parserOptions: { | ||
project: true, | ||
}, | ||
} | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
n.configs['flat/recommended-module'], | ||
unicorn.configs['flat/recommended'], | ||
functional.configs['lite'], | ||
{ | ||
ignores: ['*.mjs', 'dist/', 'coverage/', 'report/'], | ||
}, | ||
{ | ||
languageOptions, | ||
rules: customRules, | ||
}, | ||
{ | ||
files: ['**/tests/**'], | ||
languageOptions, | ||
rules: { | ||
...customRules, | ||
'no-console': 'off', | ||
'unicorn/no-await-expression-member': 'off', | ||
'unicorn/consistent-function-scoping': 'off', | ||
}, | ||
}, | ||
) |
Oops, something went wrong.