Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pnpm install

## Building

Run [tsup](https://tsup.egoist.dev) locally to type check and build source files from `src/` into output files in `lib/`:
Run [tsdown](https://tsdown.dev) locally to type check and build source files from `src/` into output files in `lib/`:

```shell
pnpm build
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
- run: pnpm build
- run: node ./lib/index.js
- run: node ./lib/index.mjs
- run: pnpm run lint:package

strategy:
fail-fast: false
matrix:
node_version:
- 18.x
- 20.x
- 22.x
- 24.x
- latest
name: Build

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ jobs:
fail-fast: false
matrix:
node_version:
- 18.x
- 20.x
- 22.x
- 24.x
- latest
ts_version:
- 4.8.4
- 5.5.4
- latest

name: Test
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ Check out our API docs for details:

📝 [ts-api-utils API docs](https://joshuakgoldberg.github.io/ts-api-utils).

### Supported Versions

`ts-api-utils` supports TypeScript versions `5.5.2` and above and Node versions `20.19.0` and above.

Note: `ts-api-utils` will not work with the native TypeScript preview (TypeScript 7) until API support is ready.\
Comment thread
RebeccaStevens marked this conversation as resolved.
Outdated
Comment thread
RebeccaStevens marked this conversation as resolved.
Outdated
See their list of [What Works So Far?](https://github.com/microsoft/typescript-go#what-works-so-far) for details.

## Development

See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"quickstart",
"tseslint",
"tsquery",
"tsup",
"tsdown",
"tsutils",
"tsvfs",
"typeguards",
Expand Down
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ if (isAbstractKeyword(node)) {
See the sidebar for the full list of available functions and types.

> Tip: if a function you'd want to use appears to be missing, check whether it exists on TypeScript itself.

### Supported Versions

`ts-api-utils` supports TypeScript versions `5.5.2` and above and Node versions `20.19.0` and above.
12 changes: 11 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,21 @@ export default defineConfig(
projectService: {
allowDefaultProject: ["*.*s", "eslint.config.js"],
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, n/no-unsupported-features/node-builtins
// eslint-disable-next-line n/no-unsupported-features/node-builtins
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"no-restricted-syntax": [
"error",
// Forbid default import from "typescript"
{
message: 'Default import from "typescript" is not allowed.',
selector:
'ImportDeclaration[source.value="typescript"] > ImportDefaultSpecifier',
},
],

// These off-by-default rules work well for this repo and we like them on.
"logical-assignment-operators": [
"error",
Expand Down
31 changes: 15 additions & 16 deletions package.json
Comment thread
RebeccaStevens marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,17 @@
"sideEffects": false,
"type": "module",
"exports": {
".": {
"types": {
"import": "./lib/index.d.ts",
"require": "./lib/index.d.cts"
},
"import": "./lib/index.js",
"require": "./lib/index.cjs"
}
".": "./lib/index.mjs",
"./package.json": "./package.json"
},
"main": "./lib/index.js",
"main": "./lib/index.mjs",
"module": "./lib/index.mjs",
"types": "./lib/index.d.mts",
"files": [
"lib/"
],
"scripts": {
"build": "tsup src/index.ts && cp lib/index.d.ts lib/index.d.cts",
"build": "tsdown src/index.ts",
"docs": "typedoc",
"docs:serve": "npx --yes http-server docs/generated",
"format": "prettier \"**/*\" --ignore-unknown",
Expand All @@ -53,9 +49,9 @@
"@phenomnomnominal/tsquery": "^6.1.3",
"@release-it/conventional-changelog": "^10.0.0",
"@types/eslint-plugin-markdown": "^2.0.2",
"@types/node": "^18.19.74",
"@types/node": "^20.19.33",
"@typescript/vfs": "^1.6.0",
"@vitest/coverage-v8": "^3.0.0",
"@vitest/coverage-v8": "^4.0.0",
"@vitest/eslint-plugin": "^1.1.25",
"console-fail-test": "^0.6.0",
"cspell": "^9.0.0",
Expand All @@ -81,21 +77,24 @@
"release-it": "^19.0.0",
"sentences-per-line": "^0.3.0",
"should-semantic-release": "^0.3.0",
"tsup": "^8.3.6",
"tsdown": "^0.16.6",
"typedoc": "^0.28.0",
"typedoc-plugin-coverage": "^4.0.0",
"typedoc-plugin-custom-validation": "^2.0.2",
"typedoc-plugin-konamimojisplosion": "^0.0.2",
"typedoc-plugin-mdn-links": "^5.0.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.22.0",
"vitest": "^3.0.0"
"vitest": "^4.0.0"
},
"peerDependencies": {
"typescript": ">=4.8.4"
"typescript": ">=5.5.2"
},
"packageManager": "pnpm@10.30.3",
"engines": {
"node": ">=18.12"
"node": ">=20.19"
},
"publishConfig": {
"provenance": true
}
}
Loading