@metamask-previews/base-controller 8.4.1-preview-887b5d5c → 8.4.2-preview-53e28985

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/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [8.4.2]
11
+
12
+ ### Fixed
13
+
14
+ - Fix TypeScript module resolution for `/next` subpath export with legacy resolution mode ([#6915](https://github.com/MetaMask/core/pull/6915))
15
+ - Added `next.d.ts` file to enable imports like `import { BaseController } from '@metamask/base-controller/next'` to work with both legacy TypeScript module resolution and Node16/NodeNext resolution modes
16
+ - Previously, this import pattern only worked with Node16/NodeNext resolution which uses the `exports` field in package.json
17
+
10
18
  ## [8.4.1]
11
19
 
12
20
  ### Changed
@@ -386,7 +394,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
386
394
 
387
395
  All changes listed after this point were applied to this package following the monorepo conversion.
388
396
 
389
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/base-controller@8.4.1...HEAD
397
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/base-controller@8.4.2...HEAD
398
+ [8.4.2]: https://github.com/MetaMask/core/compare/@metamask/base-controller@8.4.1...@metamask/base-controller@8.4.2
390
399
  [8.4.1]: https://github.com/MetaMask/core/compare/@metamask/base-controller@8.4.0...@metamask/base-controller@8.4.1
391
400
  [8.4.0]: https://github.com/MetaMask/core/compare/@metamask/base-controller@8.3.0...@metamask/base-controller@8.4.0
392
401
  [8.3.0]: https://github.com/MetaMask/core/compare/@metamask/base-controller@8.2.0...@metamask/base-controller@8.3.0
package/next.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ // Type definitions for compatibility with legacy TypeScript module resolution.
2
+ // Node16/NodeNext resolution uses the "exports" field in package.json,
3
+ // but legacy resolution needs explicit .d.ts files at the import path.
4
+
5
+ // Re-export all types and values from the CommonJS build
6
+ // eslint-disable-next-line import-x/no-useless-path-segments, import-x/extensions
7
+ export * from './dist/next/index.cjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/base-controller",
3
- "version": "8.4.1-preview-887b5d5c",
3
+ "version": "8.4.2-preview-53e28985",
4
4
  "description": "Provides scaffolding for controllers as well a communication system for all controllers",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -42,7 +42,8 @@
42
42
  "types": "./dist/index.d.cts",
43
43
  "files": [
44
44
  "dist/",
45
- "next.js"
45
+ "next.js",
46
+ "next.d.ts"
46
47
  ],
47
48
  "scripts": {
48
49
  "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",