Skip to content

Commit

Permalink
feat!: publish first-party type declarations (#1490)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `tedious` now includes TypeScript definition files. These definitions might differ in various areas from the definitions published in the `@types/tedious` package. If you notice major differences, please reach out and let us know.

---------

Co-authored-by: mShan0 <96149598+mShan0@users.noreply.github.com>
Co-authored-by: Arthur Schreiber <schreiber.arthur@googlemail.com>
  • Loading branch information
3 people committed Feb 28, 2024
1 parent 4a6273c commit 1226c20
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
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
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
@@ -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"]
}

0 comments on commit 1226c20

Please sign in to comment.