Skip to content

Commit 55534a7

Browse files
committed
fix: added TS to JS compilation for NPM package
1 parent 831765a commit 55534a7

File tree

4 files changed

+36
-30
lines changed

4 files changed

+36
-30
lines changed

bun.lockb

10 Bytes
Binary file not shown.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "cache-manager-function",
33
"version": "1.1.0",
4-
"module": "index.ts",
4+
"main": "dist/index.js",
5+
"types": "dist/index.d.ts",
56
"type": "module",
67
"devDependencies": {
78
"@semantic-release/changelog": "^6.0.3",
@@ -19,6 +20,8 @@
1920
"typescript": "^5.5.4"
2021
},
2122
"scripts": {
23+
"build": "tsc",
24+
"prepare": "yarn build",
2225
"test": "xo"
2326
},
2427
"dependencies": {

tsconfig.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"target": "esnext",
66
"moduleResolution": "bundler",
77
"moduleDetection": "force",
8-
"allowImportingTsExtensions": true,
9-
"noEmit": true,
8+
"noEmit": false,
9+
"outDir": "dist",
10+
"rootDir": "src",
1011
"composite": true,
1112
"strict": true,
1213
"downlevelIteration": true,
@@ -16,9 +17,11 @@
1617
"forceConsistentCasingInFileNames": true,
1718
"allowJs": true,
1819
"types": [
19-
"bun-types" // add Bun global
20+
"bun-types"
2021
],
2122
"emitDecoratorMetadata": true,
22-
"experimentalDecorators": true,
23-
}
24-
}
23+
"experimentalDecorators": true
24+
},
25+
"include": ["src/**/*.ts"],
26+
"exclude": ["node_modules", "**/*.test.ts"]
27+
}

yarn.lock

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,29 @@ __metadata:
14981498
languageName: node
14991499
linkType: hard
15001500

1501+
"cache-manager-function@workspace:.":
1502+
version: 0.0.0-use.local
1503+
resolution: "cache-manager-function@workspace:."
1504+
dependencies:
1505+
"@semantic-release/changelog": "npm:^6.0.3"
1506+
"@semantic-release/commit-analyzer": "npm:^13.0.0"
1507+
"@semantic-release/git": "npm:^10.0.1"
1508+
"@semantic-release/github": "npm:^10.3.3"
1509+
"@semantic-release/npm": "npm:^12.0.1"
1510+
"@semantic-release/release-notes-generator": "npm:^14.0.1"
1511+
"@types/lodash": "npm:^4.17.7"
1512+
bun-types: "npm:latest"
1513+
cache-manager: "npm:^5.7.6"
1514+
cache-manager-ioredis-yet: "npm:^2.1.1"
1515+
eslint-plugin-th-rules: "npm:^1.13.4"
1516+
lodash: "npm:^4.17.21"
1517+
reflect-metadata: "npm:^0.2.2"
1518+
xo: "npm:^0.59.3"
1519+
peerDependencies:
1520+
typescript: ^5.5.4
1521+
languageName: unknown
1522+
linkType: soft
1523+
15011524
"cache-manager-ioredis-yet@npm:^2.1.1":
15021525
version: 2.1.1
15031526
resolution: "cache-manager-ioredis-yet@npm:2.1.1"
@@ -6176,29 +6199,6 @@ __metadata:
61766199
languageName: node
61776200
linkType: hard
61786201

6179-
"semantic-release-repo-template@workspace:.":
6180-
version: 0.0.0-use.local
6181-
resolution: "semantic-release-repo-template@workspace:."
6182-
dependencies:
6183-
"@semantic-release/changelog": "npm:^6.0.3"
6184-
"@semantic-release/commit-analyzer": "npm:^13.0.0"
6185-
"@semantic-release/git": "npm:^10.0.1"
6186-
"@semantic-release/github": "npm:^10.3.3"
6187-
"@semantic-release/npm": "npm:^12.0.1"
6188-
"@semantic-release/release-notes-generator": "npm:^14.0.1"
6189-
"@types/lodash": "npm:^4.17.7"
6190-
bun-types: "npm:latest"
6191-
cache-manager: "npm:^5.7.6"
6192-
cache-manager-ioredis-yet: "npm:^2.1.1"
6193-
eslint-plugin-th-rules: "npm:^1.13.4"
6194-
lodash: "npm:^4.17.21"
6195-
reflect-metadata: "npm:^0.2.2"
6196-
xo: "npm:^0.59.3"
6197-
peerDependencies:
6198-
typescript: ^5.5.4
6199-
languageName: unknown
6200-
linkType: soft
6201-
62026202
"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.7.2":
62036203
version: 5.7.2
62046204
resolution: "semver@npm:5.7.2"

0 commit comments

Comments
 (0)