@metamask/snaps-utils 8.5.0 → 8.5.1
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 +8 -1
- package/dist/platform-version.cjs +5 -2
- package/dist/platform-version.cjs.map +1 -1
- package/dist/platform-version.d.cts +1 -1
- package/dist/platform-version.d.cts.map +1 -1
- package/dist/platform-version.d.mts +1 -1
- package/dist/platform-version.d.mts.map +1 -1
- package/dist/platform-version.mjs +2 -4
- package/dist/platform-version.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [8.5.1]
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Use regular import to reference package.json ([#2871](https://github.com/MetaMask/snaps/pull/2871))
|
|
15
|
+
|
|
10
16
|
## [8.5.0]
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -473,7 +479,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
473
479
|
- The version of the package no longer needs to match the version of all other
|
|
474
480
|
MetaMask Snaps packages.
|
|
475
481
|
|
|
476
|
-
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.5.
|
|
482
|
+
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.5.1...HEAD
|
|
483
|
+
[8.5.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.5.0...@metamask/snaps-utils@8.5.1
|
|
477
484
|
[8.5.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.4.1...@metamask/snaps-utils@8.5.0
|
|
478
485
|
[8.4.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.4.0...@metamask/snaps-utils@8.4.1
|
|
479
486
|
[8.4.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.3.0...@metamask/snaps-utils@8.4.0
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getPlatformVersion = void 0;
|
|
7
|
+
const package_json_1 = __importDefault(require("@metamask/snaps-sdk/package.json"));
|
|
4
8
|
/**
|
|
5
9
|
* Get the current supported platform version.
|
|
6
10
|
*
|
|
@@ -11,8 +15,7 @@ exports.getPlatformVersion = void 0;
|
|
|
11
15
|
* @returns The platform version.
|
|
12
16
|
*/
|
|
13
17
|
function getPlatformVersion() {
|
|
14
|
-
|
|
15
|
-
return require("@metamask/snaps-sdk/package.json").version;
|
|
18
|
+
return package_json_1.default.version;
|
|
16
19
|
}
|
|
17
20
|
exports.getPlatformVersion = getPlatformVersion;
|
|
18
21
|
//# sourceMappingURL=platform-version.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-version.cjs","sourceRoot":"","sources":["../src/platform-version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform-version.cjs","sourceRoot":"","sources":["../src/platform-version.ts"],"names":[],"mappings":";;;;;;AAAA,oFAA2D;AAE3D;;;;;;;;GAQG;AACH,SAAgB,kBAAkB;IAChC,OAAO,sBAAW,CAAC,OAAO,CAAC;AAC7B,CAAC;AAFD,gDAEC","sourcesContent":["import packageJson from '@metamask/snaps-sdk/package.json';\n\n/**\n * Get the current supported platform version.\n *\n * Note: This function assumes that the same SDK version is used across all\n * dependencies. If this is not the case, the version of the SDK that is\n * closest to the `snaps-utils` package will be returned.\n *\n * @returns The platform version.\n */\nexport function getPlatformVersion() {\n return packageJson.version;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-version.d.cts","sourceRoot":"","sources":["../src/platform-version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform-version.d.cts","sourceRoot":"","sources":["../src/platform-version.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,WAEjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-version.d.mts","sourceRoot":"","sources":["../src/platform-version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform-version.d.mts","sourceRoot":"","sources":["../src/platform-version.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,WAEjC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
const $require = $createRequire(import.meta.url);
|
|
1
|
+
import packageJson from "@metamask/snaps-sdk/package.json" with { type: "json" };
|
|
3
2
|
/**
|
|
4
3
|
* Get the current supported platform version.
|
|
5
4
|
*
|
|
@@ -10,7 +9,6 @@ const $require = $createRequire(import.meta.url);
|
|
|
10
9
|
* @returns The platform version.
|
|
11
10
|
*/
|
|
12
11
|
export function getPlatformVersion() {
|
|
13
|
-
|
|
14
|
-
return $require("@metamask/snaps-sdk/package.json").version;
|
|
12
|
+
return packageJson.version;
|
|
15
13
|
}
|
|
16
14
|
//# sourceMappingURL=platform-version.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-version.mjs","sourceRoot":"","sources":["../src/platform-version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform-version.mjs","sourceRoot":"","sources":["../src/platform-version.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,+DAAyC;AAE3D;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC","sourcesContent":["import packageJson from '@metamask/snaps-sdk/package.json';\n\n/**\n * Get the current supported platform version.\n *\n * Note: This function assumes that the same SDK version is used across all\n * dependencies. If this is not the case, the version of the SDK that is\n * closest to the `snaps-utils` package will be returned.\n *\n * @returns The platform version.\n */\nexport function getPlatformVersion() {\n return packageJson.version;\n}\n"]}
|