@savvy-web/tsdown-plugins 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/manifest/transform.js +8 -1
- package/package.json +4 -3
- package/tsdoc-metadata.json +1 -1
package/manifest/transform.js
CHANGED
|
@@ -82,11 +82,18 @@ const isTs = (p) => !isDeclarationFile(p) && (p.endsWith(".ts") || p.endsWith(".
|
|
|
82
82
|
* gates the `types` condition: when `false` (the build's dts pass was skipped, see issue #198),
|
|
83
83
|
* omitting `types` avoids pointing the published manifest at a declaration file that was never
|
|
84
84
|
* written. Defaults to `true` (current behavior, byte-identical).
|
|
85
|
+
*
|
|
86
|
+
* The trailing `default` condition mirrors the ESM artifact so `require(esm)` resolves on the
|
|
87
|
+
* Node range every published package supports (engines >=24.11.0): Node's require() matches
|
|
88
|
+
* `node`/`require`/`default` but never `import`, so an import-only map dies with
|
|
89
|
+
* ERR_PACKAGE_PATH_NOT_EXPORTED even where require(esm) works. Dual-format entries keep their
|
|
90
|
+
* dedicated CJS artifact under `require`, which wins over `default` by condition order.
|
|
85
91
|
*/
|
|
86
92
|
const tsConditions = (exportKey, dual, subdirExports, emitDts = true) => ({
|
|
87
93
|
...emitDts ? { types: toBuiltDts(exportKey, subdirExports) } : {},
|
|
88
94
|
import: toBuiltJs(exportKey, subdirExports),
|
|
89
|
-
...dual ? { require: toBuiltCjs(exportKey, subdirExports) } : {}
|
|
95
|
+
...dual ? { require: toBuiltCjs(exportKey, subdirExports) } : {},
|
|
96
|
+
default: toBuiltJs(exportKey, subdirExports)
|
|
90
97
|
});
|
|
91
98
|
/**
|
|
92
99
|
* A `./public/<path>` export value points into the staged `public/` dir, whose CONTENTS `copyPublicDir`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/tsdown-plugins",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Interface-only tsdown/rolldown plugin pack powering @savvy-web/bundler",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/tsdown-plugins",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
25
|
"types": "./index.d.ts",
|
|
26
|
-
"import": "./index.js"
|
|
26
|
+
"import": "./index.js",
|
|
27
|
+
"default": "./index.js"
|
|
27
28
|
},
|
|
28
29
|
"./package.json": "./package.json"
|
|
29
30
|
},
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"@effect/platform-node": "4.0.0-beta.98",
|
|
33
34
|
"@effected/npm": "^0.2.0",
|
|
34
35
|
"@effected/tsconfig-json": "^0.2.0",
|
|
35
|
-
"@effected/workspaces": "^0.
|
|
36
|
+
"@effected/workspaces": "^0.3.0",
|
|
36
37
|
"@microsoft/api-extractor": "^7.58.9",
|
|
37
38
|
"@microsoft/tsdoc": "^0.16.0",
|
|
38
39
|
"@microsoft/tsdoc-config": "^0.18.1",
|