Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .browserslistrc

This file was deleted.

9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

57 changes: 0 additions & 57 deletions .eslintrc

This file was deleted.

39 changes: 14 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,50 +14,39 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v2
# Install node
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# Install Yarn
- name: Install Yarn
run: npm i -g yarn
# Yarn caches
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# Install dependencies
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm i --frozen-lockfile
- name: Build
run: yarn run build
run: npm run build
- name: Test
run: yarn run test
run: npm run test
- name: Coverage
run: yarn run coverage
run: npm run coverage
- name: Upload bundles
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: lib
retention-days: 7
path: |
esm
cjs
lib
preview
- name: Upload coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage
retention-days: 7
path: coverage

34 changes: 10 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,29 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v2
# Install node
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
# Install Yarn
- name: Install Yarn
run: npm i -g yarn
# Yarn caches
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: pnpm i --frozen-lockfile
# Update version
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Update version
run: npm version --no-git-tag-version ${{ steps.get_version.outputs.VERSION }}
# Install dependencies
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn run prod
run: npm run prod
- name: Test
run: yarn run test
run: npm run test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 14 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"require": [
"source-map-support/register",
"jsdom-global/register",
"ignore-styles"
],
"extensions": ["ts", "tsx"],
"reporter": "mochawesome",
"recursive": true,
"fullTrace": true,
"bail": true,
"spec": ["test/**/*.spec.{ts,tsx}"],
"node-option": ["import=tsx", "no-warnings"]
}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
auto-install-peers=false
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

58 changes: 58 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"defaultBranch": "main",
"clientKind": "git",
"useIgnoreFile": true
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"arrowParentheses": "asNeeded",
"jsxQuoteStyle": "double",
"lineWidth": 80
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noDuplicateFontNames": "off",
"noExplicitAny": "off",
"noAssignInExpressions": "off",
"noArrayIndexKey": "warn"
},
"correctness": {
"useExhaustiveDependencies": "info"
},
"a11y": {
"useKeyWithClickEvents": "off",
"useValidAnchor": "off",
"useAltText": "off",
"useIframeTitle": "off",
"noStaticElementInteractions": "off",
"useButtonType": "off",
"useKeyWithMouseEvents": "off",
"noAutofocus": "off"
},
"style": {
"noNonNullAssertion": "off"
},
"complexity": {
"noForEach": "off"
},
"security": {
"noDangerouslySetInnerHtml": "off"
}
}
},
"files": {
"ignoreUnknown": true
}
}
8 changes: 0 additions & 8 deletions build.json

This file was deleted.

Loading