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 b366ab4
Show file tree
Hide file tree
Showing 9 changed files with 21 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
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
"author": "Scalingo <[email protected]>",
"license": "MIT",
"scripts": {
"build": "yarn run lint:js --quiet && tsc && node bundle.js",
"build": "npm run lint:js -- --quiet && tsc --listEmittedFiles && node bundle.js",
"docs": "typedoc src/index.ts",
"lint": "yarn run lint:ts && yarn run lint:js",
"lint": "npm run lint:ts && npm run lint:js",
"lint:js": "eslint --ext .js,.ts ./src ./test",
"lint:ts": "tsc --noEmit",
"test": "ts-mocha --require @babel/register --recursive --paths -p test/tsconfig.test.json test/*.js test/**/*.test.js"
},
"dependencies": {
"axios": "^1.3.1",
"axios": "^1.6.2",
"isomorphic-ws": "^5.0.0",
"ws": "^8.5.0"
"ws": "^8.16.0"
},
"devDependencies": {
"@babel/cli": "^7.17.6",
Expand Down
Loading

0 comments on commit b366ab4

Please sign in to comment.