From 7ad4fbef27ba9da4653b5701b50b40bbc33deba1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 4 Jun 2024 19:35:33 +0000 Subject: [PATCH 1/5] 9.0.0 --- CHANGELOG.md | 10 +++++++++- package.json | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc04ef66c..7d0c27048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [9.0.0] +### Uncategorized +- Use `@metamask/superstruct`, set `moduleResolution` to `NodeNext` ([#185](https://github.com/MetaMask/utils/pull/185)) +- Bump semver ([#181](https://github.com/MetaMask/utils/pull/181)) +- Use `ts-bridge` for building ([#182](https://github.com/MetaMask/utils/pull/182)) +- Bump tar from 6.1.11 to 6.2.1 ([#180](https://github.com/MetaMask/utils/pull/180)) + ## [8.4.0] ### Added - Add `toCaipChainId` utility function ([#175](https://github.com/MetaMask/utils/pull/175)) @@ -223,7 +230,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release -[Unreleased]: https://github.com/MetaMask/utils/compare/v8.4.0...HEAD +[Unreleased]: https://github.com/MetaMask/utils/compare/v9.0.0...HEAD +[9.0.0]: https://github.com/MetaMask/utils/compare/v8.4.0...v9.0.0 [8.4.0]: https://github.com/MetaMask/utils/compare/v8.3.0...v8.4.0 [8.3.0]: https://github.com/MetaMask/utils/compare/v8.2.1...v8.3.0 [8.2.1]: https://github.com/MetaMask/utils/compare/v8.2.0...v8.2.1 diff --git a/package.json b/package.json index 3851b7126..6bb51ad9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/utils", - "version": "8.4.0", + "version": "9.0.0", "description": "Various JavaScript/TypeScript utilities of wide relevance to the MetaMask codebase", "homepage": "https://github.com/MetaMask/utils#readme", "bugs": { From 8c353c23796d0ca2d028218052a817a26c914c90 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Tue, 4 Jun 2024 15:50:11 -0400 Subject: [PATCH 2/5] Update changelog --- CHANGELOG.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d0c27048..2155ada1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [9.0.0] -### Uncategorized -- Use `@metamask/superstruct`, set `moduleResolution` to `NodeNext` ([#185](https://github.com/MetaMask/utils/pull/185)) -- Bump semver ([#181](https://github.com/MetaMask/utils/pull/181)) -- Use `ts-bridge` for building ([#182](https://github.com/MetaMask/utils/pull/182)) -- Bump tar from 6.1.11 to 6.2.1 ([#180](https://github.com/MetaMask/utils/pull/180)) +### Changed +- Bump devDependency `typescript` from `~4.8.4` to `~5.0.4` ([#185](https://github.com/MetaMask/utils/pull/185)). +- Bump dependency `semver` from `^5.7.1` to `^7.6.0` ([#181](https://github.com/MetaMask/utils/pull/181)). + +### Fixed +- **BREAKING:** Use `ts-bridge` for building, which supports entry points `@metamask/utils` and `@metamask/utils/node` for both CJS and ESM, and `@metamask/utils/package.json` for JSON. ([#182](https://github.com/MetaMask/utils/pull/182)). + - **BREAKING:** Exposes separate build entry points and type declarations for CommonJS and ESM via package manifest `exports`. + - **BREAKING:** It's no longer possible to import files from the dist folder directly. +- **BREAKING:** Replace dependency `superstruct` `^1.0.3` with ESM-compatible `@metamask/superstruct` `^3.0.0` ([#185](https://github.com/MetaMask/utils/pull/185)). ## [8.4.0] ### Added From 85daf6d3e8a71e76d00f126c4e93ce4c82e51304 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Tue, 4 Jun 2024 16:13:34 -0400 Subject: [PATCH 3/5] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2155ada1a..f65551c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [9.0.0] ### Changed -- Bump devDependency `typescript` from `~4.8.4` to `~5.0.4` ([#185](https://github.com/MetaMask/utils/pull/185)). - Bump dependency `semver` from `^5.7.1` to `^7.6.0` ([#181](https://github.com/MetaMask/utils/pull/181)). ### Fixed From e80f30c2a00c6c1094895687e299ad00ae2fd218 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Wed, 5 Jun 2024 12:14:15 -0400 Subject: [PATCH 4/5] Update CHANGELOG.md Co-authored-by: Elliot Winkler --- CHANGELOG.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f65551c9d..05b5e97ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump dependency `semver` from `^5.7.1` to `^7.6.0` ([#181](https://github.com/MetaMask/utils/pull/181)). ### Fixed -- **BREAKING:** Use `ts-bridge` for building, which supports entry points `@metamask/utils` and `@metamask/utils/node` for both CJS and ESM, and `@metamask/utils/package.json` for JSON. ([#182](https://github.com/MetaMask/utils/pull/182)). - - **BREAKING:** Exposes separate build entry points and type declarations for CommonJS and ESM via package manifest `exports`. - - **BREAKING:** It's no longer possible to import files from the dist folder directly. +- Remove chunk files ([#182](https://github.com/MetaMask/utils/pull/182)) + - Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present. +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#182](https://github.com/MetaMask/utils/pull/182)) + - Previously, this package shipped with only one variant of type declaration files, and these files were only CommonJS-compatible, and the `exports` field in `package.json` linked to these files. This is an anti-pattern and was rightfully flagged by the ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). All of the ATTW checks now pass. - **BREAKING:** Replace dependency `superstruct` `^1.0.3` with ESM-compatible `@metamask/superstruct` `^3.0.0` ([#185](https://github.com/MetaMask/utils/pull/185)). ## [8.4.0] From b703c209b69a2a090aecdb30a17261820c326071 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Wed, 5 Jun 2024 12:23:34 -0400 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05b5e97ee..f0feaa230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump dependency `semver` from `^5.7.1` to `^7.6.0` ([#181](https://github.com/MetaMask/utils/pull/181)). ### Fixed +- **BREAKING:** Replace dependency `superstruct` `^1.0.3` with ESM-compatible `@metamask/superstruct` `^3.0.0` ([#185](https://github.com/MetaMask/utils/pull/185)). - Remove chunk files ([#182](https://github.com/MetaMask/utils/pull/182)) - Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present. - Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#182](https://github.com/MetaMask/utils/pull/182)) - Previously, this package shipped with only one variant of type declaration files, and these files were only CommonJS-compatible, and the `exports` field in `package.json` linked to these files. This is an anti-pattern and was rightfully flagged by the ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). All of the ATTW checks now pass. -- **BREAKING:** Replace dependency `superstruct` `^1.0.3` with ESM-compatible `@metamask/superstruct` `^3.0.0` ([#185](https://github.com/MetaMask/utils/pull/185)). ## [8.4.0] ### Added