Skip to content

Commit af3cc31

Browse files
authored
Merge pull request #308 from knockout/fix/package-module-paths
Fix broken module paths, remove helpers from published packages
2 parents c917c2a + 6621beb commit af3cc31

33 files changed

Lines changed: 116 additions & 195 deletions

File tree

.changeset/fix-module-paths.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
"@tko/bind": patch
3+
"@tko/binding.component": patch
4+
"@tko/binding.core": patch
5+
"@tko/binding.foreach": patch
6+
"@tko/binding.if": patch
7+
"@tko/binding.template": patch
8+
"@tko/builder": patch
9+
"@tko/computed": patch
10+
"@tko/filter.punches": patch
11+
"@tko/lifecycle": patch
12+
"@tko/observable": patch
13+
"@tko/provider": patch
14+
"@tko/provider.attr": patch
15+
"@tko/provider.bindingstring": patch
16+
"@tko/provider.component": patch
17+
"@tko/provider.databind": patch
18+
"@tko/provider.multi": patch
19+
"@tko/provider.mustache": patch
20+
"@tko/provider.native": patch
21+
"@tko/provider.virtual": patch
22+
"@tko/utils": patch
23+
"@tko/utils.component": patch
24+
"@tko/utils.functionrewrite": patch
25+
"@tko/utils.jsx": patch
26+
"@tko/utils.parser": patch
27+
"@tko/build.knockout": patch
28+
"@tko/build.reference": patch
29+
---
30+
31+
Fix broken ESM module paths and remove test helpers from published packages
32+
33+
The `module` field in 22 packages pointed to non-existent files (e.g., `dist/bind.js`). Fixed to `dist/index.js`. Test helpers are no longer included in published packages.

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ dts:
4949
docker-build:
5050
$(DOCKER) build . --tag tko
5151

52-
# Run the `repackage` target in every directory. Essentially
53-
# homogenizes the `package.json`.
54-
repackage: tools/repackage.mjs
55-
$(LERNA) exec --stream -- $(MAKE) repackage
56-
5752
# Run to update the versions of all the package.json files, before publishing.
5853
bump:
5954
$(LERNA) version

builds/knockout/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
]
2727
},
2828
"files": [
29-
"dist/",
30-
"helpers/"
29+
"dist/"
3130
],
3231
"licenses": [
3332
{
@@ -57,7 +56,6 @@
5756
".": {
5857
"require": "./dist/index.cjs",
5958
"import": "./dist/index.mjs"
60-
},
61-
"./helpers/*": "./helpers/*"
59+
}
6260
}
6361
}

builds/reference/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"tslib": "^2.2.0"
3030
},
3131
"files": [
32-
"dist/",
33-
"helpers/"
32+
"dist/"
3433
],
3534
"homepage": "https://tko.io",
3635
"licenses": [
@@ -43,8 +42,7 @@
4342
".": {
4443
"require": "./dist/index.cjs",
4544
"import": "./dist/index.mjs"
46-
},
47-
"./helpers/*": "./helpers/*"
45+
}
4846
},
4947
"bugs": {
5048
"url": "https://github.com/knockout/tko/issues"

packages/bind/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"version": "4.0.0",
33
"name": "@tko/bind",
44
"description": "TKO DOM-Observable Binding",
5-
"module": "dist/bind.js",
5+
"module": "dist/index.js",
66
"dependencies": {
77
"@tko/computed": "^4.0.0",
88
"@tko/lifecycle": "^4.0.0",
@@ -15,8 +15,7 @@
1515
"@tko/binding.foreach": "^4.0.0"
1616
},
1717
"files": [
18-
"dist/",
19-
"helpers/"
18+
"dist/"
2019
],
2120
"repository": {
2221
"type": "git",
@@ -39,7 +38,6 @@
3938
".": {
4039
"require": "./dist/index.cjs",
4140
"import": "./dist/index.js"
42-
},
43-
"./helpers/*": "./helpers/*"
41+
}
4442
}
4543
}

packages/bind/spec/crossWindowBehaviors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { bindings as coreBindings } from '@tko/binding.core'
2121

2222
import { bindings as ifBindings } from '@tko/binding.if'
2323

24-
import { dummyTemplateEngine } from '@tko/binding.template/helpers/dummyTemplateEngine'
24+
import { dummyTemplateEngine } from '../../binding.template/helpers/dummyTemplateEngine'
2525

2626
const BLANK_HTML = `
2727
<!doctype html>

packages/binding.component/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"version": "4.0.0",
33
"name": "@tko/binding.component",
44
"description": "component: binding for web components",
5-
"module": "dist/binding.component.js",
5+
"module": "dist/index.js",
66
"license": "MIT",
77
"dependencies": {
88
"@tko/bind": "^4.0.0",
@@ -16,8 +16,7 @@
1616
"tslib": "^2.2.0"
1717
},
1818
"files": [
19-
"dist/",
20-
"helpers/"
19+
"dist/"
2120
],
2221
"homepage": "https://tko.io",
2322
"licenses": [
@@ -30,8 +29,7 @@
3029
".": {
3130
"require": "./dist/index.cjs",
3231
"import": "./dist/index.js"
33-
},
34-
"./helpers/*": "./helpers/*"
32+
}
3533
},
3634
"bugs": {
3735
"url": "https://github.com/knockout/tko/issues"

packages/binding.core/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"version": "4.0.0",
33
"name": "@tko/binding.core",
44
"description": "TKO Core bindings",
5-
"module": "dist/binding.core.js",
5+
"module": "dist/index.js",
66
"files": [
7-
"dist/",
8-
"helpers/"
7+
"dist/"
98
],
109
"repository": {
1110
"type": "git",
@@ -39,7 +38,6 @@
3938
".": {
4039
"require": "./dist/index.cjs",
4140
"import": "./dist/index.js"
42-
},
43-
"./helpers/*": "./helpers/*"
41+
}
4442
}
4543
}

packages/binding.foreach/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"version": "4.0.0",
33
"name": "@tko/binding.foreach",
44
"description": "Knockout Foreach Binding",
5-
"module": "dist/binding.foreach.js",
5+
"module": "dist/index.js",
66
"files": [
7-
"dist/",
8-
"helpers/"
7+
"dist/"
98
],
109
"repository": {
1110
"type": "git",
@@ -39,7 +38,6 @@
3938
".": {
4039
"require": "./dist/index.cjs",
4140
"import": "./dist/index.js"
42-
},
43-
"./helpers/*": "./helpers/*"
41+
}
4442
}
4543
}

packages/binding.if/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"version": "4.0.0",
33
"name": "@tko/binding.if",
44
"description": "TKO conditional (if/ifnot/unless/with/else) bindings",
5-
"module": "dist/binding.if.js",
5+
"module": "dist/index.js",
66
"files": [
7-
"dist/",
8-
"helpers/"
7+
"dist/"
98
],
109
"repository": {
1110
"type": "git",
@@ -39,7 +38,6 @@
3938
".": {
4039
"require": "./dist/index.cjs",
4140
"import": "./dist/index.js"
42-
},
43-
"./helpers/*": "./helpers/*"
41+
}
4442
}
4543
}

0 commit comments

Comments
 (0)