Skip to content

Commit

Permalink
chore: move to npm, update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ksol committed Dec 26, 2023
1 parent 420966d commit 13a1896
Show file tree
Hide file tree
Showing 11 changed files with 7,218 additions and 4,135 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,9 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn docs
cache: 'npm'
- run: npm ci
- run: npm run docs

- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Using Node.js 18 (LTS)
- name: Using Node.js 20 (LTS)
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn lint
node-version: '20.x'
cache: npm
- run: npm ci
- run: npm run lint
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Using Node.js 18 (LTS)
- name: Using Node.js 20 (LTS)
uses: actions/setup-node@v2
with:
node-version: '18.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn build
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 3 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn test
cache: 'npm'
- run: npm ci
- run: npm run test
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
node_modules/
yarn-error.log
dist/
docs/
.idea/
package-lock.json
.DS_Store
.vscode/
*.save
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
.prettierrc.js
.travis.yml
node_modules/
yarn-error.log
docs/
assets
coverage
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* chore: bump dependencies
* chore: linter violations following update
* versions: dropping node 14, no longer maintained. Adds 20.x to test matrix
* tooling: switch from yarn to npm

## 0.8.2

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ node examples/Addons/add_addon.js
### Install

```
yarn install
npm install
```

### Run tests

```
yarn test
npm run test
```

### Release a new version
Expand Down
Loading

0 comments on commit 13a1896

Please sign in to comment.