Fix: prevent double ./cjs/ prefix in main field + fix imports

- Build script was adding ./cjs/ prefix even when main already had it
- Fixed @testing-library/react dependency for tests
- Changed package-style imports to relative imports in rootJs/index.ts
- Bump version to 0.85.5
This commit is contained in:
2026-01-18 07:15:18 +03:00
parent 4fbef2fcd2
commit 4539abb66e
5 changed files with 177 additions and 6 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
"sideEffects": false,
"type": "module",
"types": "./index.d.ts",
"version": "0.85.4",
"version": "0.85.5",
"main": "./cjs/index.js",
"module": "./index.js",
"bin": {
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @pezkuwi/dev
export const packageInfo = { name: '@pezkuwi/dev', path: 'auto', type: 'auto', version: '0.85.4' };
export const packageInfo = { name: '@pezkuwi/dev', path: 'auto', type: 'auto', version: '0.85.5' };
+2 -2
View File
@@ -5,7 +5,7 @@
import './augmented.js';
/** This import should appear as-in in the ouput (cjs without asserts) */
import testJson from '@pezkuwi/dev/rootJs/testJson.json' with { type: 'json' };
import testJson from './testJson.json' with { type: 'json' };
/** Double double work, i.e. re-exports */
export { Clazz } from './Clazz.js';
@@ -20,7 +20,7 @@ export function bigIntExp (): bigint {
export async function dynamic (a: number, b: number): Promise<number> {
// NOTE we go via this path so it points to the same location in both ESM
// and CJS output (a './dynamic' import would be different otherwise)
const { sum } = await import('@pezkuwi/dev/rootJs/dynamic.mjs');
const { sum } = await import('./dynamic.mjs');
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return sum(a, b);