@nzyme/esm 0.14.0 → 0.15.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/dist/dirname.js CHANGED
@@ -1,4 +1,4 @@
1
- import { fileURLToPath } from 'url';
1
+ import { fileURLToPath } from 'node:url';
2
2
  /**
3
3
  * Replacement for __dirname in ESM context.
4
4
  * @example const __dirname = dirname(import.meta);
@@ -1 +1 @@
1
- {"version":3,"file":"dirname.js","sourceRoot":"","sources":["../src/dirname.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IAC/B,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"dirname.js","sourceRoot":"","sources":["../src/dirname.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IAC/B,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,CAAC"}
package/dist/filename.js CHANGED
@@ -1,4 +1,4 @@
1
- import { fileURLToPath } from 'url';
1
+ import { fileURLToPath } from 'node:url';
2
2
  /**
3
3
  * Replacement for __filename in ESM context.
4
4
  * @example const __filename = filename(import.meta.url);
@@ -1 +1 @@
1
- {"version":3,"file":"filename.js","sourceRoot":"","sources":["../src/filename.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW;IAChC,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC;AAED,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"filename.js","sourceRoot":"","sources":["../src/filename.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW;IAChC,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC;AAED,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Sometimes when importing CJS from ESM context types are not properly inferred.
3
3
  */
4
- export declare function unwrapCjsDefaultImport<T>(value: {
4
+ export declare function unwrapCjsDefaultImport<T>(value: T | {
5
5
  default: T;
6
- } | T): T;
6
+ }): T;
package/package.json CHANGED
@@ -1,39 +1,42 @@
1
1
  {
2
2
  "name": "@nzyme/esm",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
+ "description": "ESM module resolution helpers",
5
+ "license": "MIT",
6
+ "author": "Michał Kędrzyński <m.kedrzynski@gmail.com>",
4
7
  "repository": {
5
8
  "type": "git",
6
9
  "url": "https://github.com/kedrzu/nzyme.git"
7
10
  },
8
- "license": "MIT",
9
- "author": "Michał Kędrzyński <m.kedrzynski@gmail.com>",
10
- "sideEffects": false,
11
+ "files": [
12
+ "dist"
13
+ ],
11
14
  "type": "module",
15
+ "sideEffects": false,
12
16
  "exports": {
13
17
  ".": {
18
+ "types": "./dist/index.d.ts",
14
19
  "import": "./dist/index.js",
15
- "types": "./dist/index.d.ts"
20
+ "default": "./dist/index.js"
21
+ },
22
+ "./*.js": {
23
+ "types": "./dist/*.d.ts",
24
+ "import": "./dist/*.js",
25
+ "source": "./src/*.ts",
26
+ "default": "./dist/*.js"
16
27
  }
17
28
  },
18
- "files": [
19
- "dist"
20
- ],
21
- "scripts": {
22
- "build:esm": "tsc --build ./tsconfig.esm.json",
23
- "lint": "eslint . --fix --cache",
24
- "smoke:mjs": "node tests/smoke.test.mjs"
29
+ "publishConfig": {
30
+ "access": "public"
25
31
  },
26
- "dependencies": {
27
- "tslib": "^2.8.1"
32
+ "scripts": {
33
+ "build": "tsgo --build tsconfig.esm.json",
34
+ "format": "oxfmt ./src > /dev/null"
28
35
  },
29
36
  "devDependencies": {
30
- "@nzyme/eslint": "^0.14.0",
31
- "@nzyme/tsconfig": "^0.14.0",
32
- "@types/node": "^22.14.0",
33
- "eslint": "^9.24.0",
34
- "typescript": "^5.8.3"
35
- },
36
- "publishConfig": {
37
- "access": "public"
37
+ "@nzyme/tsconfig": "0.15.0",
38
+ "@types/node": "26.6.4",
39
+ "@typescript/native-preview": "^7.0.0-dev.20260707.2",
40
+ "oxfmt": "0.71.0"
38
41
  }
39
42
  }