Skip to content

Commit c6de735

Browse files
nandi95Nandor Kraszlan
andauthored
feat: 0.19.0 (#358)
* ci(deps): up node version * test(events): add test for non existing event emit * feat(helpers): add type assertion to isUuid * chore: simplify and make ts more strict * chore: bump version * build: make package an ESM module * chore: code style fixes * chore: update and add dependencies tsconfig, glob, ts-node and rollup-plugin-output-size * chore: made rollup config into ts file * ci: add provenance * docs: small comment changes * build: work-in-progress export helpers separately and ease access * style: adjust eslint rule * test: use response from global namespace * chore: made release config a module * docs: update to the correct api docs link * test(api-calls): update test for new node versions * test: remove test with 100 status nodejs/undici#197 * test: remove fetch polyfill for node * chore: add types to default export * test(helpers): started testing for `poll` * ci: update node version * perf: use built in utility types * feat: add utility type * test(services): fix error expectation for node 22 * perf(helpers): remove unnecessary function overrides * feat(helpers): add `poll` function * chore: remove duplicate type export * test(api-calls): start debugging equality issue * test: change from jest to vitest * test: add edge runtime for testing #140 * test: remove unused jest config * ci: update action versions * style: upgrade eslint * fix: import assertion issue * chore(deps): updated packages * chore(deps): update action versions * docs(helpers): document poll fn * fix(helpers): fix type issue * build: ignore output * test(ancestry-collection): ensure the children are model collections * style: ignore links file * chore: upgrade eslint * feat(collection): add missing array functions --------- Co-authored-by: Nandor Kraszlan <nandor@wooshii.com>
1 parent 6d27d41 commit c6de735

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+9791
-9173
lines changed
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
/**
2-
* @type {import('@commitlint/types').UserConfig}
3-
*/
4-
module.exports = {
5-
extends: ['@commitlint/config-conventional'],
6-
7-
rules: {
8-
'scope-enum': [
9-
2,
10-
'always',
11-
[
12-
'attributes', // guarding and casting can also go under attributes
13-
'global-config',
14-
'exception',
15-
'events',
16-
'services',
17-
'helpers',
18-
'collection',
19-
'model',
20-
'model-collection',
21-
'ancestry-collection',
22-
'paginator',
23-
'factory',
24-
'query-builder',
25-
'timestamps', // soft-deletes can also go under timestamps
26-
'relations',
27-
'api-calls',
28-
'deps',
29-
'deps-dev',
30-
'internal' // things that are not meant to be used outside the package
31-
]
32-
],
33-
}
34-
};
1+
/**
2+
* @type {import('@commitlint/types').UserConfig}
3+
*/
4+
module.exports = {
5+
extends: ['@commitlint/config-conventional'],
6+
7+
rules: {
8+
'scope-enum': [
9+
2,
10+
'always',
11+
[
12+
'attributes', // guarding and casting can also go under attributes
13+
'global-config',
14+
'exception',
15+
'events',
16+
'services',
17+
'helpers',
18+
'collection',
19+
'model',
20+
'model-collection',
21+
'ancestry-collection',
22+
'paginator',
23+
'factory',
24+
'query-builder',
25+
'timestamps', // soft-deletes can also go under timestamps
26+
'relations',
27+
'api-calls',
28+
'deps',
29+
'deps-dev',
30+
'internal' // things that are not meant to be used outside the package
31+
]
32+
],
33+
}
34+
};

.eslintrc.js

Lines changed: 0 additions & 103 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2222
cancel-in-progress: true
2323
steps:
24-
- uses: actions/checkout@v3
25-
- uses: actions/setup-node@v3
24+
- uses: actions/checkout@v5
25+
- uses: actions/setup-node@v5
2626
with:
2727
cache: 'npm'
2828
- name: Install dependencies

.github/workflows/deploy-api-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
timeout-minutes: 10
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v5
16+
- uses: actions/setup-node@v5
1717
with:
1818
cache: 'npm'
1919
- name: Install dependencies

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1919
cancel-in-progress: true
2020
steps:
21-
- uses: actions/checkout@v3
22-
- uses: actions/setup-node@v3
21+
- uses: actions/checkout@v5
22+
- uses: actions/setup-node@v5
2323
with:
2424
cache: 'npm'
2525
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,23 @@ jobs:
3838
publish:
3939
timeout-minutes: 10
4040
runs-on: ubuntu-latest
41+
permissions:
42+
contents: read
43+
id-token: write
4144
steps:
42-
- uses: actions/checkout@v3
43-
- uses: actions/setup-node@v3
45+
- uses: actions/checkout@v5
46+
- uses: actions/setup-node@v5
4447
with:
4548
registry-url: https://registry.npmjs.org/
4649
- name: Install dependencies
4750
run: npm ci --ignore-scripts
4851
- name: Build library
4952
run: npm run build
5053
- name: Publish library
51-
run: npm publish --access public
54+
run: npm publish --provenance --access public
5255
env:
5356
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54-
- uses: actions/setup-node@v3
57+
- uses: actions/setup-node@v5
5558
with:
5659
registry-url: https://npm.pkg.github.com/
5760
- run: npm publish --access public

.github/workflows/test.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- '**/tsconfig.json'
88
- 'tests/**/*.ts'
99
- 'src/**/*.ts'
10-
- 'jest.config.ts'
1110
- 'package-lock.json'
1211
branches:
1312
- main
@@ -21,37 +20,54 @@ jobs:
2120
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2221
cancel-in-progress: true
2322
steps:
24-
# subsequent calls to this action will use already downloaded code from the workspace
25-
- uses: actions/checkout@v3
26-
jest-browser:
23+
- uses: actions/checkout@v5
24+
test-browser:
2725
needs: setup-test
2826
timeout-minutes: 10
2927
runs-on: ubuntu-latest
3028
steps:
31-
- uses: actions/checkout@v3
32-
- uses: actions/setup-node@v3
29+
- uses: actions/checkout@v5
30+
- uses: actions/setup-node@v5
3331
with:
32+
node-version: 'lts/*'
3433
cache: 'npm'
35-
node-version: 'latest'
3634
- name: Install dependencies
37-
run: npm ci --ignore-scripts
35+
run: npm ci
3836
- name: Run tests on jsdom
39-
run: npx jest --selectProjects=jsdom
40-
jest-node:
37+
run: npm run test -- --environment=jsdom
38+
test-node:
4139
needs: setup-test
4240
timeout-minutes: 10
4341
runs-on: ubuntu-latest
4442
strategy:
4543
matrix:
46-
# current and active LTS
47-
node: [ 18, 20 ]
44+
node: ['lts/*', 'current']
45+
fail-fast: false
4846
steps:
49-
- uses: actions/checkout@v3
50-
- uses: actions/setup-node@v3
47+
- uses: actions/checkout@v5
48+
- uses: actions/setup-node@v5
5149
with:
50+
node-version: ${{ matrix.node }}
5251
cache: 'npm'
52+
- name: Install dependencies
53+
run: npm ci
54+
- name: Run tests on node ${{ matrix.node }}
55+
run: npm run test
56+
test-edge:
57+
needs: setup-test
58+
timeout-minutes: 10
59+
runs-on: ubuntu-latest
60+
strategy:
61+
matrix:
62+
node: ['lts/*', 'current']
63+
fail-fast: false
64+
steps:
65+
- uses: actions/checkout@v5
66+
- uses: actions/setup-node@v5
67+
with:
5368
node-version: ${{ matrix.node }}
69+
cache: 'npm'
5470
- name: Install dependencies
55-
run: npm ci --ignore-scripts
56-
- name: Run tests on node v${{ matrix.node }}
57-
run: npx jest --selectProjects=node
71+
run: npm ci
72+
- name: Run tests on node ${{ matrix.node }}
73+
run: npm run test -- --environment edge-runtime

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ index.*.*js*
44
array.*.*js*
55
string.*.*js*
66
types
7+
/Support
78
*.tgz
9+
tslib.es6-*
810

911
# in case gh-pages manually managed
1012
index.html

build.tsconfig.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": [
4+
"src/*.ts"
5+
]
6+
}

docs/.vuepress/links.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const sidebar: SidebarConfig = [
6767
]
6868

6969
const navbar: NavbarConfig = [
70-
{ text: 'API', link: 'https://upfrontjs.github.io/framework', target:'_blank' }
70+
{ text: 'API', link: 'https://api.upfrontjs.com/framework', target:'_blank' }
7171
]
7272

7373
export default {

0 commit comments

Comments
 (0)