Relates to #99 and #62.
Thanks for fixing the export conditions for temporal-polyfill in v1.0.3 to support requiring from CJS. Unfortunately, temporal-utils has a similar issue that can likely be fixed in the same way.
I ran into this issue when testing code that depends on temporal-polyfill with Jest (v30.4). I get the following error:
Cannot find module 'temporal-utils/protected' from '../../../node_modules/temporal-polyfill/chunks/internal.js'
Require stack:
/<redacted>/node_modules/temporal-polyfill/chunks/internal.js
/<redacted>/node_modules/temporal-polyfill/chunks/classApi-basic.js
/<redacted>/node_modules/temporal-polyfill/index.js
...
Manually editing the package.json#exports config for temporal-utils to use the same format as temporal-polyfill fixes the issue:
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "default": "./dist/index.js"
},
"./protected": {
"types": "./dist/protected.d.ts",
- "import": "./dist/protected.js"
+ "default": "./dist/protected.js"
},
"./protected-error-messages": {
"types": "./dist/protected-error-messages.d.ts",
- "import": "./dist/protected-error-messages.js"
+ "default": "./dist/protected-error-messages.js"
}
},
I'll open a pull request in a few minutes.
Relates to #99 and #62.
Thanks for fixing the export conditions for
temporal-polyfillin v1.0.3 to support requiring from CJS. Unfortunately,temporal-utilshas a similar issue that can likely be fixed in the same way.I ran into this issue when testing code that depends on
temporal-polyfillwith Jest (v30.4). I get the following error:Manually editing the
package.json#exportsconfig fortemporal-utilsto use the same format astemporal-polyfillfixes the issue:"exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.js" + "default": "./dist/index.js" }, "./protected": { "types": "./dist/protected.d.ts", - "import": "./dist/protected.js" + "default": "./dist/protected.js" }, "./protected-error-messages": { "types": "./dist/protected-error-messages.d.ts", - "import": "./dist/protected-error-messages.js" + "default": "./dist/protected-error-messages.js" } },I'll open a pull request in a few minutes.