Skip to content

Commit 444908d

Browse files
committed
fix: include compose-spec types in dist and add files field
- Copy compose-spec.d.ts to dist/ during build so the type is available to consumers - Add "files" field to package.json to avoid publishing unrelated files
1 parent c6ac897 commit 444908d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",
66
"types": "dist/index.d.ts",
7+
"files": [
8+
"dist",
9+
"schema",
10+
"readme.md",
11+
"LICENSE",
12+
"CHANGELOG.md"
13+
],
714
"scripts": {
815
"ci": "yarn install --frozen-lockfile",
916
"test": "npx vitest --dir test --test-timeout=30000",
1017
"lint": "eslint src/**/*.ts test/**/*.ts",
1118
"generate:types": "json2ts schema/compose-spec.json src/compose-spec.d.ts",
12-
"build": "yarn generate:types && tsc",
13-
"prepublishOnly": "yarn generate:types && tsc",
19+
"build": "yarn generate:types && tsc && cp src/compose-spec.d.ts dist/",
20+
"prepublishOnly": "yarn generate:types && tsc && cp src/compose-spec.d.ts dist/",
1421
"release": "yarn build && standard-version"
1522
},
1623
"repository": {

0 commit comments

Comments
 (0)