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

feat: 0.19.0 #358

Draft
wants to merge 29 commits into
base: release/0.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
293ffc8
ci(deps): up node version
Apr 8, 2024
cf82beb
test(events): add test for non existing event emit
Apr 8, 2024
2cb8ffe
feat(helpers): add type assertion to isUuid
Apr 8, 2024
c2fbe35
chore: simplify and make ts more strict
Apr 8, 2024
265aa74
chore: bump version
Apr 8, 2024
19ebe14
build: make package an ESM module
nandi95 Apr 9, 2024
9995ec1
chore: code style fixes
nandi95 Apr 10, 2024
242279c
chore: update and add dependencies
nandi95 Apr 10, 2024
586552b
chore: made rollup config into ts file
nandi95 Apr 10, 2024
54b16c1
ci: add provenance
nandi95 Apr 10, 2024
bcae937
docs: small comment changes
nandi95 Apr 10, 2024
ddd0372
build: work-in-progress export helpers separately and ease access
nandi95 Apr 10, 2024
a21b8be
style: adjust eslint rule
nandi95 Apr 10, 2024
7fe5101
test: use response from global namespace
nandi95 Apr 10, 2024
c9f3e83
chore: made release config a module
nandi95 Apr 10, 2024
f26f6f8
docs: update to the correct api docs link
nandi95 Apr 10, 2024
117d23c
test(api-calls): update test for new node versions
nandi95 Apr 11, 2024
ca26449
test: remove test with 100 status
nandi95 Apr 12, 2024
e9892c2
test: remove fetch polyfill for node
nandi95 Apr 12, 2024
ad1aea9
chore: add types to default export
nandi95 Sep 27, 2024
e951182
test(helpers): started testing for `poll`
nandi95 Sep 27, 2024
b222a7d
ci: update node version
nandi95 Sep 27, 2024
d2531e3
perf: use built in utility types
nandi95 Sep 27, 2024
321c502
feat: add utility type
nandi95 Sep 27, 2024
c50fbc5
test(services): fix error expectation for node 22
nandi95 Sep 27, 2024
e077bad
perf(helpers): remove unnecessary function overrides
nandi95 Sep 27, 2024
5dbb9cf
feat(helpers): add `poll` function
nandi95 Oct 3, 2024
fe8f488
chore: remove duplicate type export
nandi95 Oct 3, 2024
001259b
test(api-calls): start debugging equality issue
nandi95 Oct 3, 2024
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
68 changes: 34 additions & 34 deletions .commitlintrc.js β†’ .commitlintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
/**
* @type {import('@commitlint/types').UserConfig}
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [
2,
'always',
[
'attributes', // guarding and casting can also go under attributes
'global-config',
'exception',
'events',
'services',
'helpers',
'collection',
'model',
'model-collection',
'ancestry-collection',
'paginator',
'factory',
'query-builder',
'timestamps', // soft-deletes can also go under timestamps
'relations',
'api-calls',
'deps',
'deps-dev',
'internal' // things that are not meant to be used outside the package
]
],
}
};
/**
* @type {import('@commitlint/types').UserConfig}
*/
module.exports = {
extends: ['@commitlint/config-conventional'],

rules: {
'scope-enum': [
2,
'always',
[
'attributes', // guarding and casting can also go under attributes
'global-config',
'exception',
'events',
'services',
'helpers',
'collection',
'model',
'model-collection',
'ancestry-collection',
'paginator',
'factory',
'query-builder',
'timestamps', // soft-deletes can also go under timestamps
'relations',
'api-calls',
'deps',
'deps-dev',
'internal' // things that are not meant to be used outside the package
]
],
}
};
210 changes: 107 additions & 103 deletions .eslintrc.js β†’ .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,103 +1,107 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigDir: __dirname,
project: "**/tsconfig.json",
ecmaVersion: "es2020"
},
plugins: [
"@typescript-eslint",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/all"
],
env: {
browser: true,
es2020: true
},
ignorePatterns: [
'node_modules',
'*.js',
'/types'
],
rules: {
// https://eslint.org/docs/rules/
"no-any": "off",
"no-prototype-builtins": "off",
"no-unused-vars": "off",
"prefer-rest-params": "warn",
"semi": "off",
"no-extra-parens": "off",
"quotes": "off",
"func-call-spacing": "off",
"comma-spacing": "off",
"keyword-spacing": "off",
"object-curly-spacing": ["warn", "always"],
"indent": "off",
"comma-dangle": ["warn", "never"],
"max-len": ["warn", 120],
"eqeqeq": "error",
"no-restricted-imports": "off",
"lines-between-class-members": "off",
"lines-around-comment": "off",

// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
'@typescript-eslint/object-curly-spacing': ['warn', 'always'],
"@typescript-eslint/indent": ["warn", 4],
"@typescript-eslint/quotes": ["warn", "single"],
"@typescript-eslint/semi": "error",
"@typescript-eslint/no-extra-parens": "error",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/explicit-module-boundary-types": ["error", { "allowArgumentsExplicitlyTypedAsAny": true }],
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-ts-expect-error": "warn",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/comma-spacing": "warn",
"@typescript-eslint/keyword-spacing": "warn",
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
"@typescript-eslint/consistent-type-imports": ["error", { prefer: 'type-imports' }],
"@typescript-eslint/member-delimiter-style": "warn",
"@typescript-eslint/type-annotation-spacing": "warn",
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/space-before-function-paren": ["warn", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-loop-func": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/array-type": "warn",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/no-restricted-imports": "off",
"@typescript-eslint/lines-between-class-members": ["error"],
"@typescript-eslint/lines-around-comment": ["warn", {
"allowInterfaceStart": true,
"allowBlockStart": true,
"allowModuleStart": true,
"allowTypeStart": true,
"allowObjectStart": true,
"allowClassStart": true,
}]
}
}
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigDir: __dirname,
project: "**/tsconfig.json",
ecmaVersion: "es2020"
},
plugins: [
"@typescript-eslint",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/all"
],
env: {
browser: true,
es2020: true
},
ignorePatterns: [
'node_modules',
'*.js',
'/types'
],
rules: {
// https://eslint.org/docs/rules/
"no-any": "off",
"no-prototype-builtins": "off",
"no-unused-vars": "off",
"prefer-rest-params": "warn",
"semi": "off",
"no-extra-parens": "off",
"quotes": "off",
"func-call-spacing": "off",
"comma-spacing": "off",
"keyword-spacing": "off",
"object-curly-spacing": ["warn", "always"],
"indent": "off",
"comma-dangle": ["warn", "never"],
"max-len": ["warn", 120],
"eqeqeq": "error",
"no-restricted-imports": "off",
"lines-between-class-members": "off",
"lines-around-comment": "off",

// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
'@typescript-eslint/object-curly-spacing': ['warn', 'always'],
"@typescript-eslint/indent": ["warn", 4],
"@typescript-eslint/quotes": ["warn", "single"],
"@typescript-eslint/semi": "error",
"@typescript-eslint/no-extra-parens": "error",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/explicit-module-boundary-types": ["error", { "allowArgumentsExplicitlyTypedAsAny": true }],
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-ts-expect-error": "warn",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/comma-spacing": "warn",
"@typescript-eslint/keyword-spacing": "warn",
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
"@typescript-eslint/consistent-type-imports": ["error", { prefer: 'type-imports' }],
"@typescript-eslint/member-delimiter-style": "warn",
"@typescript-eslint/type-annotation-spacing": "warn",
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/space-before-function-paren": ["warn", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-loop-func": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/array-type": "warn",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/no-restricted-imports": "off",
"@typescript-eslint/lines-between-class-members": ["error"],
"@typescript-eslint/max-params": ["warn", {
"max": 5
}],
"@typescript-eslint/lines-around-comment": ["warn", {
"allowInterfaceStart": true,
"allowBlockStart": true,
"allowModuleStart": true,
"allowTypeStart": true,
"allowObjectStart": true,
"allowClassStart": true,
}],
"@typescript-eslint/class-methods-use-this": "off",
}
}
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
publish:
timeout-minutes: 10
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -48,7 +51,7 @@ jobs:
- name: Build library
run: npm run build
- name: Publish library
run: npm publish --access public
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
matrix:
# current and active LTS
node: [ 18, 20 ]
node: [ 20, 22 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ index.*.*js*
array.*.*js*
string.*.*js*
types
/Support
*.tgz

# in case gh-pages manually managed
Expand Down
6 changes: 6 additions & 0 deletions build.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"include": [
"src/*.ts"
]
}
2 changes: 1 addition & 1 deletion docs/.vuepress/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const sidebar: SidebarConfig = [
]

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

export default {
Expand Down
Loading