-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: typescript * test fixes etc - Refactored to use TypeScript and modern ES/Node.js features. - Minimum Node.js version is now v16. - Ships ESM and CJS versions. - Upgraded package dependencies, in particular using Glob v8. - Switched to Vite, Vitest, and pnpm. - API is the same, but some internals changed.
- Loading branch information
Showing
42 changed files
with
3,893 additions
and
8,967 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,3 +1,4 @@ | ||
coverage | ||
dist | ||
node_modules | ||
.eslintrc.cjs |
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,16 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'plugin:@typescript-eslint/strict', | ||
'plugin:prettier/recommended' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
tsconfigRootDir: __dirname | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
root: true | ||
} |
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,12 +1,12 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: 'weekly' | ||
interval: "weekly" | ||
open-pull-requests-limit: 20 | ||
|
||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: 'weekly' | ||
interval: "weekly" |
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,9 +1,6 @@ | ||
name: Continuous Deployment | ||
name: cd | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
|
@@ -15,29 +12,32 @@ jobs: | |
with: | ||
ref: ${{ github.event.release.target_commitish }} | ||
|
||
- name: Setup Node.js LTS | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Setup Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' | ||
node-version: 16 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
uses: bahmutov/npm-install@v1 | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Configure git | ||
run: | | ||
git config --global user.name "GitHub CD bot" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "${{ secrets.GIT_NAME }}" | ||
git config --global user.email "${{ secrets.GIT_EMAIL }}" | ||
- name: Update version in package.json | ||
run: npm version ${{ github.event.release.tag_name }} --allow-same-version | ||
run: pnpm version ${{ github.event.release.tag_name }} --allow-same-version | ||
|
||
- name: Configure npm client for publish | ||
run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" | ||
|
||
- name: Build | ||
run: npm run build | ||
run: pnpm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" | ||
|
||
- name: Publish package to npmjs.com | ||
run: npm publish | ||
run: pnpm publish --no-git-checks | ||
env: | ||
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,36 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Run CI checks | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Use Node 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run CI suite | ||
run: pnpm ci |
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm lint-staged |
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,4 @@ | ||
{ | ||
"testing.automaticallyOpenPeekView": "never", | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.