Skip to content

Commit 6830f69

Browse files
committed
chore: modernize to TypeScript 7, native ESM and node:test
- native ES modules: type=module, exports map, explicit .js import extensions, engines node >=22.12.0 - TypeScript 7 (tsgo) with es2024 target, nodenext resolution, verbatimModuleSyntax and explicit types: [node] - @imqueue/rpc dependency dropped: the only use was rpc's signature() helper (removed from rpc 3.x public exports), now replicated locally in src/signature.ts (deterministic sorted-key sha256/64-bit key); the sole runtime dependency is now graphql - tests migrated from mocha/chai/nyc to node:test + node:assert with built-in coverage; suite expanded from a single shape check to cover the memoized Dependency factory and the hash()/gqlType() helpers - lint/format switched from tslint to oxlint + oxfmt; dev dependencies reduced to @types/node, oxlint, oxfmt, typescript - npm package excludes sources and dev tooling - version left at published 2.0.3 (npm version major -> 3.0.0 on release)
1 parent 602b90a commit 6830f69

18 files changed

Lines changed: 1849 additions & 4407 deletions

.github/workflows/build.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,49 @@ name: Build
22

33
on:
44
push:
5+
branches: [master, v3]
6+
tags: ['*']
57
pull_request:
68

9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
716
jobs:
8-
build:
17+
quality:
18+
name: Lint & format
919
runs-on: ubuntu-latest
20+
timeout-minutes: 10
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Use Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 24.x
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Check formatting
35+
run: npm run format:check
1036

37+
- name: Lint
38+
run: npm run lint
39+
40+
test:
41+
name: Test (Node ${{ matrix.node-version }})
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 15
1144
strategy:
45+
fail-fast: false
1246
matrix:
13-
node-version: [lts/*]
14-
47+
node-version: [22.x, 24.x]
1548
steps:
1649
- name: Checkout repository
1750
uses: actions/checkout@v4
@@ -20,9 +53,10 @@ jobs:
2053
uses: actions/setup-node@v4
2154
with:
2255
node-version: ${{ matrix.node-version }}
56+
cache: npm
2357

2458
- name: Install dependencies
25-
run: npm install
59+
run: npm ci
2660

2761
- name: Run tests
2862
run: npm test

.npmignore

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,21 @@
11
.gitignore
2-
.travis.yml
3-
.dockerignore
4-
.codebeatignore
5-
.codebeatsettings
62
.github
7-
8-
.ssh/
9-
dist/
10-
tmp/
11-
out-tsc/
12-
build/
3+
.travis.yml
4+
.idea/
135
.nyc_output/
14-
156
node_modules/
16-
17-
.idea/
18-
.project
19-
.classpath
20-
.c9/
21-
*.launch
22-
.settings/
23-
*.sublime-workspace
24-
.vscode/*
25-
.env
26-
27-
.sass-cache/
28-
connect.lock/
297
coverage/
30-
typings/
318
docs/
32-
33-
debug*
34-
*.pid
35-
*.log
36-
.DS_Store
37-
Thumbs.db
38-
399
test/
40-
41-
*.js.map
10+
tsconfig.json
4211
*.ts
4312
!*.d.ts
44-
tsconfig.json
45-
13+
*.js.map
4614
*.tgz
47-
.github
15+
.DS_Store
16+
17+
# Dev/tooling - never part of the published package
18+
scripts/
19+
.oxlintrc.json
20+
.oxfmtrc.json
21+
.agent-out/

.oxfmtrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"singleQuote": true,
3+
"tabWidth": 4,
4+
"printWidth": 80,
5+
"semi": true,
6+
"trailingComma": "all",
7+
"arrowParens": "avoid",
8+
"bracketSpacing": true
9+
}

.oxlintrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"categories": {
4+
"correctness": "error"
5+
},
6+
"rules": {
7+
"no-debugger": "error",
8+
"no-console": ["warn", { "allow": ["warn", "error", "info"] }],
9+
"no-unused-vars": "warn"
10+
},
11+
"ignorePatterns": [
12+
"**/*.js",
13+
"**/*.d.ts",
14+
"docs/",
15+
"coverage/",
16+
".nyc_output/",
17+
".agent-out/",
18+
"node_modules/"
19+
]
20+
}

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
* purchase a proprietary commercial license. Please contact us at
2222
* <support@imqueue.com> to get commercial licensing options.
2323
*/
24-
export * from './src';
24+
export * from './src/index.js';

0 commit comments

Comments
 (0)