Skip to content

Commit

Permalink
Update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzzy committed Nov 25, 2024
1 parent 327c017 commit 1fc53d5
Show file tree
Hide file tree
Showing 38 changed files with 5,674 additions and 18,616 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc.js

This file was deleted.

41 changes: 24 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci --force
- name: Lint
run: npm run lint
- name: Test
run: npm run test -- --coverage --verbose --ci
- name: Build
run: npm run build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run Tests
run: npm run test -- --reporter=junit
- name: Lint code
run: npm run lint
- name: Check types
run: npm run typecheck
- name: Check code formatting
run: npm run formatcheck
- name: Build
run: npm run build
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist/
7 changes: 0 additions & 7 deletions .prettierrc.js

This file was deleted.

6 changes: 2 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"[typescript]": { "editor.formatOnSave": false },
"tslint.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"cSpell.words": [
"Kriasoft"
]
"cSpell.words": ["Kriasoft"]
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
```js
const router = new UniversalRouter({
path: ['/one/:parameter', '/two/:parameter'],
action: context => context.params,
action: (context) => context.params,
})

router.resolve('/one/a') // => { parameter: 'a' }
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,27 @@ import UniversalRouter from 'universal-router'
const routes = [
{
path: '', // optional
action: () => `<h1>Home</h1>`
action: () => `<h1>Home</h1>`,
},
{
path: '/posts',
action: () => console.log('checking child routes for /posts'),
children: [
{
path: '', // optional, matches both "/posts" and "/posts/"
action: () => `<h1>Posts</h1>`
action: () => `<h1>Posts</h1>`,
},
{
path: '/:id',
action: (context) => `<h1>Post #${context.params.id}</h1>`
}
]
}
action: (context) => `<h1>Post #${context.params.id}</h1>`,
},
],
},
]

const router = new UniversalRouter(routes)

router.resolve('/posts').then(html => {
router.resolve('/posts').then((html) => {
document.body.innerHTML = html // renders: <h1>Posts</h1>
})
```
Expand Down
Loading

0 comments on commit 1fc53d5

Please sign in to comment.