Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update project #62

Merged
merged 12 commits into from
Nov 12, 2023
Merged
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
22 changes: 9 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,51 @@ on: [push, pull_request]

jobs:
full:
name: Node.js 17 Full
name: Node.js 20 Full
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 17
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Run tests
run: pnpm test
env:
FORCE_COLOR: 2
short:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 14, 12]
node-version: [18, 16]
name: Node.js ${{ matrix.node-version }} Quick
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Run unit tests
run: pnpm test
env:
FORCE_COLOR: 2
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
node_modules/
yarn-error.log

coverage/
coverage/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).

## next
* Drop NodeJS 12, 14 support
* Update dependencies

## 0.10.3
* Update dependencies

Expand Down
6 changes: 2 additions & 4 deletions component/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ it('unsubscribes', async () => {
component.trigger('click', { users: { a: '1' } })
await nextTick()
expect(log.actions()).toEqual([
{ type: 'logux/subscribe', channel: 'users/1', fields: ['photo'] },
{ type: 'logux/subscribe', channel: 'users/2', fields: ['photo'] },
{ type: 'logux/unsubscribe', channel: 'users/2', fields: ['photo'] }
{ type: 'logux/subscribe', channel: 'users/1', fields: ['photo'] }
])
})

Expand Down Expand Up @@ -237,9 +235,9 @@ it('changes subscription', async () => {

component.trigger('click', { id: '2' })
await nextTick()
await delay(10)
expect(component.client.log.actions()).toEqual([
{ type: 'logux/subscribe', channel: 'users/1', fields: ['photo'] },
{ type: 'logux/unsubscribe', channel: 'users/1', fields: ['photo'] },
{ type: 'logux/subscribe', channel: 'users/2', fields: ['photo'] }
])
})
Expand Down
5 changes: 1 addition & 4 deletions composable/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ it('unsubscribes', async () => {
component.trigger('click', { users: { a: '1' } })
await nextTick()
expect(log.actions()).toEqual([
{ type: 'logux/subscribe', channel: 'users/1', fields: ['photo'] },
{ type: 'logux/subscribe', channel: 'users/2', fields: ['photo'] },
{ type: 'logux/unsubscribe', channel: 'users/2', fields: ['photo'] }
{ type: 'logux/subscribe', channel: 'users/1', fields: ['photo'] }
])
})

Expand Down Expand Up @@ -190,7 +188,6 @@ it('changes subscription', async () => {
await nextTick()
expect(log.actions()).toEqual([
{ type: 'logux/subscribe', channel: 'users/1', fields: ['photo'] },
{ type: 'logux/unsubscribe', channel: 'users/1', fields: ['photo'] },
{ type: 'logux/subscribe', channel: 'users/2', fields: ['photo'] }
])
})
Expand Down
29 changes: 16 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"websocket"
],
"scripts": {
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage && eslint . && check-dts && size-limit"
"test:lint": "eslint .",
"test:coverage": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage",
"test:types": "check-dts",
"test:size": "size-limit",
"test": "pnpm run /^test:/"
},
"author": "Eduard Aksamitov <[email protected]>",
"license": "MIT",
Expand All @@ -23,7 +27,7 @@
"./package.json": "./package.json"
},
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
"node": "^16.0.0 || ^18.0.0 || >=20.0.0"
},
"peerDependencies": {
"@logux/client": ">=0.10.0",
Expand All @@ -32,20 +36,20 @@
"vuex": ">=4.0.2"
},
"dependencies": {
"nanoevents": "^6.0.2"
"nanoevents": "^8.0.0"
},
"devDependencies": {
"@jest/globals": "^27.5.1",
"@logux/actions": "^0.2.3",
"@logux/client": "^0.15.3",
"@logux/core": "^0.7.3",
"@logux/actions": "^0.3.1",
"@logux/client": "^0.18.4",
"@logux/core": "^0.8.5",
"@logux/eslint-config": "46.0.1",
"@size-limit/preset-small-lib": "^7.0.8",
"@types/jest": "^27.4.0",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"@vue/test-utils": "^2.0.0",
"check-dts": "^0.6.7",
"@vue/test-utils": "^2.4.1",
"check-dts": "^0.7.2",
"eslint": "^8.16.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
Expand All @@ -59,14 +63,13 @@
"jest": "^27.5.1",
"nano-staged": "^0.8.0",
"nanodelay": "^2.0.2",
"nanostores": "^0.5.12",
"prettier": "^2.6.2",
"simple-git-hooks": "^2.7.0",
"prettier": "^3.0.3",
"simple-git-hooks": "^2.9.0",
"size-limit": "^7.0.8",
"ts-jest": "^28.0.3",
"typescript": "^4.6.4",
"vue": "^3.2.36",
"vuex": "^4.0.2"
"vue": "^3.3.8",
"vuex": "^4.1.0"
},
"simple-git-hooks": {
"pre-commit": "./node_modules/.bin/nano-staged"
Expand Down
Loading