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!: publish first-party type declarations #1490

Merged
merged 6 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"license": "MIT",
"version": "0.0.0-dev",
"main": "./lib/tedious.js",
"types": "./lib/tedious.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/tediousjs/tedious.git"
Expand All @@ -43,6 +44,7 @@
"@azure/identity": "^3.4.1",
"@azure/keyvault-keys": "^4.4.0",
"@js-joda/core": "^5.6.1",
"@types/node": ">=18",
"bl": "^6.0.11",
"iconv-lite": "^0.6.3",
"js-md4": "^0.3.2",
Expand All @@ -62,7 +64,6 @@
"@types/depd": "^1.1.36",
"@types/lru-cache": "^5.1.1",
"@types/mocha": "^10.0.6",
"@types/node": ">=18",
"@types/sprintf-js": "^1.1.4",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
Expand All @@ -86,7 +87,8 @@
"test": "mocha --forbid-only test/unit test/unit/token test/unit/tracking-buffer",
"test-integration": "mocha --forbid-only test/integration/",
"test-all": "mocha --forbid-only test/unit/ test/unit/token/ test/unit/tracking-buffer test/integration/",
"build": "rimraf lib && babel src --out-dir lib --extensions .js,.ts",
"build:types": "tsc --project tsconfig.build-types.json",
"build": "rimraf lib && babel src --out-dir lib --extensions .js,.ts && npm run build:types",
"prepublish": "npm run build",
"semantic-release": "semantic-release"
},
Expand Down
15 changes: 15 additions & 0 deletions tsconfig.build-types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
// Disable features needed by the IDE which harm type declaration generation
"isolatedModules": false,
"noEmit": false,

// Enable features needed for type declaration generation
"declaration": true,
"emitDeclarationOnly": true,
"declarationDir": "lib"
},

"include": ["types/*.d.ts", "src/tedious.ts"]
}
Loading