diff --git a/.changeset/olive-pugs-invite.md b/.changeset/olive-pugs-invite.md new file mode 100644 index 0000000..1c055dd --- /dev/null +++ b/.changeset/olive-pugs-invite.md @@ -0,0 +1,5 @@ +--- +"@swc/cli": patch +--- + +Publish TypeScript declarations, and keep compiled test and mock files out of the package diff --git a/packages/cli/package.json b/packages/cli/package.json index a6e5ff3..e3dbfaa 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -3,6 +3,7 @@ "version": "0.8.1", "description": "CLI for the swc project", "main": "lib/swc/index.js", + "types": "lib/swc/index.d.ts", "scripts": { "prepublishOnly": "pnpm build", "types": "tsc", @@ -81,6 +82,8 @@ }, "files": [ "bin", - "lib" + "lib", + "!lib/**/__tests__", + "!lib/**/__mocks__" ] -} \ No newline at end of file +} diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 9979547..70245a1 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -10,6 +10,7 @@ "noFallthroughCasesInSwitch": true, "esModuleInterop": true, "lib": ["ES2019.Array", "ES2020.Promise", "ES2015"], + "declaration": true, "outDir": "./lib" }, "include": ["src"]