Skip to content

Commit

Permalink
Merge pull request #126 from PeculiarVentures/prepare-publish
Browse files Browse the repository at this point in the history
Update dependencies, improve code structure, and enhance testing
  • Loading branch information
microshine authored Jan 7, 2025
2 parents 2192a81 + e71359a commit f1d3a52
Show file tree
Hide file tree
Showing 363 changed files with 25,676 additions and 9,346 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

44 changes: 0 additions & 44 deletions .eslintrc.json

This file was deleted.

16 changes: 9 additions & 7 deletions .github/actions/repo-init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,24 @@ inputs:
runs:
using: composite
steps:
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: "https://npm.pkg.github.com/"
node-version: 20
registry-url: "https://registry.npmjs.org/"
cache: "yarn"

- name: Setup .npmrc
shell: bash
run: |
npm set @peculiarventures:registry=https://npm.pkg.github.com/
npm set //npm.pkg.github.com/:_authToken=${{ inputs.token }}
npm set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Ensure access
shell: bash
run: npm whoami --registry https://npm.pkg.github.com/
run: npm whoami --registry https://registry.npmjs.org/
env:
NODE_AUTH_TOKEN: ${{ inputs.token }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Config git user
shell: bash
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/preprelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:

- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -37,4 +36,4 @@ jobs:
# - uses: actions/delete-package-versions@v2
# with:
# package-name: "test-client"
# min-versions-to-keep: 4
# min-versions-to-keep: 4
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: release

on:
# push:
# branches:
# - main
pull_request:
branches:
- main
Expand Down Expand Up @@ -56,10 +53,9 @@ jobs:
echo "::set-env name=CURRENT_VERSION::${CURRENT_VERSION}"
- name: Create comment
uses: actions/github-script@0.8.0
uses: actions/github-script@v7
if: env.PREV_VERSION != env.CURRENT_VERSION
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run linting
run: yarn lint

- name: Run tests with coverage
run: yarn coverage

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,5 @@ dist

build
.DS_Store
*.pdf
*.pdf
page_*.png
8 changes: 0 additions & 8 deletions .mocharc.yml

This file was deleted.

1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": false,
"printWidth": 80
}
21 changes: 0 additions & 21 deletions .vscode/launch.json

This file was deleted.

4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@
// "packages/*/src/**/*.spec.ts": true,
},
"typescript.tsdk": "node_modules/typescript/lib",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"jest.runMode": "on-demand",
}
Loading

0 comments on commit f1d3a52

Please sign in to comment.