Skip to content

Commit e4b0191

Browse files
committed
Fix fdc3-commonjs build by including d.ts files
fixes #1691
1 parent 1300f2b commit e4b0191

5 files changed

Lines changed: 56 additions & 35 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ website/.yarn
2626
toolbox/fdc3-for-web/fdc3-web-impl/generated/
2727
cucumber-report.html
2828
nyc-coverage-report/
29-
.history/
29+
.history/
30+
.rollup.cache
31+
tsconfig.tsbuildinfo

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3030
* Revert schema of `fdc3.interaction` context type back to use anyOf in place of oneOf for the `interactionType` property. Since it could be a string enum or a string, validation could not differentiate. ([#1598](https://github.com/finos/FDC3/issues/1598))
3131
* Fix `fdc3.timeRange` context example to use correctly formatted dateTime. ([#1599](https://github.com/finos/FDC3/issues/1599))
3232
* Removes broken sourcemaps from npm package output ([#1589](https://github.com/finos/FDC3/issues/1589))
33+
* fixes the `fdc3-commonjs` build to include `d.ts` files and corrects the config for easier consumption in different environments
3334

3435
## [FDC3 Standard 2.2](https://github.com/finos/FDC3/compare/v2.1..v2.2) - 2025-03-12
3536

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
{
2-
"name": "@finos/fdc3-commonjs",
3-
"version": "2.2.0",
4-
"author": "Fintech Open Source Foundation (FINOS)",
5-
"homepage": "https://fdc3.finos.org",
6-
"repository": {
7-
"type": "git",
8-
"url": "git+https://github.com/finos/FDC3.git"
9-
},
10-
"publishConfig": {
11-
"tag": "latest"
12-
},
13-
"exports": {
14-
"require": "./dist/index.cjs"
15-
},
16-
"license": "Apache-2.0",
17-
"files": [
18-
"dist"
19-
],
20-
"scripts": {
21-
"clean": "npx rimraf dist",
22-
"build": "npx rollup -c rollup.config.mjs"
23-
},
24-
"dependencies": {
25-
"@finos/fdc3": "2.2.0"
26-
},
27-
"devDependencies": {
28-
"@rollup/plugin-commonjs": "^28.0.1",
29-
"@rollup/plugin-json": "^6.1.0",
30-
"@rollup/plugin-node-resolve": "^15.3.0",
31-
"@rollup/plugin-typescript": "^12.1.1",
32-
"rollup": "^4.27.4"
33-
}
34-
}
2+
"name": "@finos/fdc3-commonjs",
3+
"version": "2.2.0",
4+
"author": "Fintech Open Source Foundation (FINOS)",
5+
"homepage": "https://fdc3.finos.org",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/finos/FDC3.git"
9+
},
10+
"publishConfig": {
11+
"tag": "latest"
12+
},
13+
"main": "./dist/index.cjs",
14+
"types": "./dist/index.d.ts",
15+
"exports": {
16+
"types": "./dist/index.d.ts",
17+
"require": "./dist/index.cjs",
18+
"import": "./dist/index.cjs"
19+
},
20+
"license": "Apache-2.0",
21+
"files": [
22+
"dist"
23+
],
24+
"scripts": {
25+
"clean": "npx rimraf dist .rollup.cache",
26+
"build": "npx rollup -c rollup.config.mjs"
27+
},
28+
"dependencies": {
29+
"@finos/fdc3": "2.2.0"
30+
},
31+
"devDependencies": {
32+
"@rollup/plugin-commonjs": "^28.0.1",
33+
"@rollup/plugin-json": "^6.1.0",
34+
"@rollup/plugin-node-resolve": "^15.3.0",
35+
"@rollup/plugin-typescript": "^12.1.1",
36+
"rollup": "^4.27.4"
37+
}
38+
}

packages/fdc3-commonjs/rollup.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export default [
2929
include: /\/regenerator-runtime\//,
3030
}),
3131
json(),
32-
typescript(),
32+
json(),
33+
typescript({ declaration: true, declarationDir: 'dist' }),
3334
],
3435
},
3536
];
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../../tsconfig.root.json",
3+
"compilerOptions": {
4+
"rootDir": "src",
5+
"outDir": "dist",
6+
"declaration": true,
7+
"declarationDir": "dist",
8+
"sourceMap": true
9+
},
10+
"include": [
11+
"src"
12+
]
13+
}

0 commit comments

Comments
 (0)