Skip to content

Commit 79299a1

Browse files
authored
fix: esm ext to imports & @feathers-community/eslint-config (#28)
* fix: esm ext to imports & @feathers-community/eslint-config * chore: ci
1 parent 7879e81 commit 79299a1

68 files changed

Lines changed: 4979 additions & 4412 deletions

Some content is hidden

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

.eslintignore

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

.eslintrc

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
node-version: [18.x, 20.x, 22.x]
14+
node-version: [20.x, 22.x]
1515
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
1616

1717
steps:
@@ -33,7 +33,7 @@ jobs:
3333
- uses: pnpm/action-setup@v4
3434
- uses: actions/setup-node@v4
3535
with:
36-
node-version: "20"
36+
node-version: "22"
3737
- run: pnpm i
3838
- uses: paambaati/codeclimate-action@v9
3939
env:
@@ -49,6 +49,6 @@ jobs:
4949
- uses: pnpm/action-setup@v4
5050
- uses: actions/setup-node@v4
5151
with:
52-
node-version: "20"
52+
node-version: "22"
5353
- run: pnpm i
5454
- run: pnpm run build

.github/workflows/pkg.pr.new.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish Any Commit
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v4
11+
12+
- run: npm install -g corepack@latest
13+
- run: corepack enable
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 22
17+
cache: "pnpm"
18+
19+
- name: Install dependencies
20+
run: pnpm install
21+
22+
- name: Build
23+
run: pnpm build
24+
25+
- run: pnpx pkg-pr-new publish

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# feathers-utils
22

33
[![npm](https://img.shields.io/npm/v/feathers-utils)](https://www.npmjs.com/package/feathers-utils)
4-
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/fratzinger/feathers-utils/node.js.yml?branch=main)](https://github.com/fratzinger/feathers-utils/actions/workflows/node.js.yml?query=branch%3Amain)
4+
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/fratzinger/feathers-utils/node.js.yaml?branch=main)](https://github.com/fratzinger/feathers-utils/actions/workflows/node.js.yaml?query=branch%3Amain)
55
[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/fratzinger/feathers-utils)](https://codeclimate.com/github/fratzinger/feathers-utils)
66
[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/fratzinger/feathers-utils)](https://codeclimate.com/github/fratzinger/feathers-utils)
77
[![npm](https://img.shields.io/npm/dm/feathers-utils)](https://www.npmjs.com/package/feathers-utils)
88
[![GitHub license](https://img.shields.io/github/license/fratzinger/feathers-utils)](https://github.com/fratzinger/feathers-utils/blob/main/LICENSE.md)
99

1010
> NOTE: This is the version for Feathers v5. For Feathers v4 use [feathers-utils v1](https://github.com/fratzinger/feathers-utils/tree/crow)
1111
12-
1312
## Installation
1413

1514
```shell
@@ -48,7 +47,7 @@ npm i feathers-utils
4847
- `markHookForSkip`: add hookName to `context.params.skipHooks` - also see `shouldSkip`
4948
- `mergeQuery`: deeply merges queries
5049
- `mergeArrays`: merges arrays with intersection options
51-
- `pushSet`: if existing array: *push*, else *set*
50+
- `pushSet`: if existing array: _push_, else _set_
5251
- `setQueryKeySafely`
5352
- `setResultEmpty`
54-
- `shouldSkip`: checks `context.params.skipHooks` for `'all' | '${hookName}' | '${type}:${hookName}'` - also see `markHookForSkip`
53+
- `shouldSkip`: checks `context.params.skipHooks` for `'all' | '${hookName}' | '${type}:${hookName}'` - also see `markHookForSkip`

build.config.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
// eslint-disable-next-line import/no-unresolved
2-
import { defineBuildConfig } from "unbuild";
3-
import pkg from "./package.json";
1+
import { defineBuildConfig } from 'unbuild'
2+
import pkg from './package.json'
43

54
export default defineBuildConfig({
6-
entries: ["./src/index"],
7-
outDir: "./dist",
5+
entries: ['./src/index'],
6+
outDir: './dist',
87
declaration: true,
98
externals: [
109
...Object.keys(pkg.dependencies),
@@ -14,6 +13,6 @@ export default defineBuildConfig({
1413
emitCJS: true,
1514
},
1615
replace: {
17-
"import.meta.vitest": "undefined",
16+
'import.meta.vitest': 'undefined',
1817
},
19-
});
18+
})

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import config from '@feathers-community/eslint-config'
2+
3+
export default config()

package.json

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"main": "./dist/index.cjs",
2424
"module": "./dist/index.mjs",
2525
"types": "./dist/index.d.ts",
26+
"type": "module",
2627
"files": [
2728
"CHANGELOG.md",
2829
"LICENSE",
@@ -38,34 +39,30 @@
3839
"test": "vitest run",
3940
"vitest": "vitest",
4041
"coverage": "vitest run --coverage",
41-
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
42+
"lint": "eslint"
4243
},
4344
"dependencies": {
44-
"@feathersjs/adapter-commons": "^5.0.31",
45-
"@feathersjs/errors": "^5.0.31",
46-
"@feathersjs/feathers": "^5.0.31",
47-
"fast-equals": "^5.0.1",
45+
"@feathersjs/adapter-commons": "^5.0.33",
46+
"@feathersjs/errors": "^5.0.33",
47+
"@feathersjs/feathers": "^5.0.33",
48+
"fast-equals": "^5.2.2",
4849
"feathers-hooks-common": "^8.2.1",
4950
"lodash": "^4.17.21"
5051
},
5152
"devDependencies": {
52-
"@feathersjs/memory": "^5.0.31",
53-
"@types/lodash": "^4.17.13",
54-
"@types/node": "^22.10.1",
55-
"@typescript-eslint/eslint-plugin": "^6.16.0",
56-
"@typescript-eslint/parser": "^6.16.0",
57-
"@vitest/coverage-v8": "^2.1.8",
58-
"eslint": "^8.56.0",
59-
"eslint-config-prettier": "^9.1.0",
60-
"eslint-import-resolver-typescript": "^3.7.0",
61-
"eslint-plugin-import": "^2.29.1",
62-
"eslint-plugin-prettier": "^5.1.2",
63-
"np": "^10.1.0",
64-
"prettier": "^3.4.1",
53+
"@feathers-community/eslint-config": "^0.0.4",
54+
"@feathersjs/memory": "^5.0.33",
55+
"@tsconfig/node22": "^22.0.0",
56+
"@types/lodash": "^4.17.16",
57+
"@types/node": "^22.13.9",
58+
"@vitest/coverage-v8": "^3.0.7",
59+
"eslint": "^9.21.0",
60+
"np": "^10.2.0",
61+
"prettier": "^3.5.3",
6562
"shx": "^0.3.4",
66-
"typescript": "^5.7.2",
67-
"unbuild": "^2.0.0",
68-
"vitest": "^2.1.8"
63+
"typescript": "^5.8.2",
64+
"unbuild": "^3.5.0",
65+
"vitest": "^3.0.7"
6966
},
7067
"peerDependencies": {
7168
"@feathersjs/feathers": "^5.0.0"

0 commit comments

Comments
 (0)