Skip to content

Commit

Permalink
Merge branch 'main' into chore/parallelization-add-detected-tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasini committed Sep 16, 2024
2 parents 59ed7a3 + 29e75c3 commit 48c6517
Show file tree
Hide file tree
Showing 123 changed files with 1,729 additions and 1,438 deletions.
13 changes: 0 additions & 13 deletions .yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch

This file was deleted.

2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If you have a project that depends on a package in this monorepo, you may want t

If you're developing your project locally and want to test changes to a package, you can follow these steps:

1. First, you must build the monorepo. It's recommend to run `yarn build:watch` so that changes to the package you want to change are reflected in your project automatically.
1. First, you must build the monorepo, by running `yarn build`.
2. Next, you need to connect the package to your project by overriding the resolution logic in your package manager to replace the published version of the package with the local version.

1. Open `package.json` in the project and locate the dependency entry for the package.
Expand Down
16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/core-monorepo",
"version": "201.0.0",
"version": "202.0.0",
"private": true,
"description": "Monorepo for packages shared between MetaMask clients",
"repository": {
Expand All @@ -12,12 +12,10 @@
"packages/*"
],
"scripts": {
"build": "yarn run build:source && yarn run build:types",
"build": "yarn ts-bridge --project tsconfig.build.json --verbose",
"build:clean": "rimraf dist '**/*.tsbuildinfo' && yarn build",
"build:docs": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build:docs",
"build:source": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build",
"build:types": "tsc --build tsconfig.build.json --verbose",
"build:watch": "yarn run build --watch",
"changelog:update": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:update",
"changelog:validate": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:validate",
"create-package": "ts-node scripts/create-package",
Expand Down Expand Up @@ -45,7 +43,6 @@
"resolutions": {
"[email protected]": "^6.5.7",
"fast-xml-parser@^4.3.4": "^4.4.1",
"tsup@^8.0.2": "patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch",
"[email protected]": "^7.5.10"
},
"devDependencies": {
Expand All @@ -59,9 +56,10 @@
"@metamask/eslint-config-nodejs": "^12.1.0",
"@metamask/eslint-config-typescript": "^12.1.0",
"@metamask/eth-block-tracker": "^10.0.0",
"@metamask/eth-json-rpc-provider": "^4.1.3",
"@metamask/json-rpc-engine": "^9.0.2",
"@metamask/eth-json-rpc-provider": "^4.1.4",
"@metamask/json-rpc-engine": "^9.0.3",
"@metamask/utils": "^9.1.0",
"@ts-bridge/cli": "^0.5.1",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
Expand Down Expand Up @@ -93,7 +91,6 @@
"semver": "^7.6.3",
"simple-git-hooks": "^2.8.0",
"ts-node": "^10.9.1",
"tsup": "^8.0.2",
"typescript": "~5.2.2",
"yargs": "^17.7.2"
},
Expand All @@ -106,8 +103,7 @@
"@lavamoat/preinstall-always-fail": false,
"@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": true,
"babel-runtime>core-js": false,
"simple-git-hooks": false,
"tsup>esbuild": true
"simple-git-hooks": false
}
}
}
28 changes: 27 additions & 1 deletion packages/accounts-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [18.2.1]

### Changed

- Bump `@metamask/eth-snap-keyring` from `^4.3.1` to `^4.3.3` ([#4689](https://github.com/MetaMask/core/pull/4689))
- Bump `@metamask/snaps-sdk` from `^6.1.1` to `^6.5.0` ([#4689](https://github.com/MetaMask/core/pull/4689))
- Bump `@metamask/snaps-utils` from `^7.8.1` to `^8.1.1` ([#4689](https://github.com/MetaMask/core/pull/4689))
- Bump peer dependency `@metamask/snaps-controllers` from `^9.3.0` to `^9.7.0` ([#4689](https://github.com/MetaMask/core/pull/4689))

### Fixed

- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648))
- 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.
- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)).
- 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.

## [18.2.0]

### Added
Expand Down Expand Up @@ -295,7 +320,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial release ([#1637](https://github.com/MetaMask/core/pull/1637))

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[18.2.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[18.2.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[18.1.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[18.1.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
23 changes: 14 additions & 9 deletions packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/accounts-controller",
"version": "18.2.0",
"version": "18.2.1",
"description": "Manages internal accounts",
"keywords": [
"MetaMask",
Expand All @@ -18,19 +18,24 @@
"sideEffects": false,
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/types/index.d.ts"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"types": "./dist/types/index.d.ts",
"main": "./dist/index.cjs",
"types": "./dist/index.d.cts",
"files": [
"dist/"
],
"scripts": {
"build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean",
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
"build:docs": "typedoc",
"changelog:update": "../../scripts/update-changelog.sh @metamask/accounts-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/accounts-controller",
Expand All @@ -43,7 +48,7 @@
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/base-controller": "^7.0.0",
"@metamask/base-controller": "^7.0.1",
"@metamask/eth-snap-keyring": "^4.3.3",
"@metamask/keyring-api": "^8.1.0",
"@metamask/snaps-sdk": "^6.5.0",
Expand All @@ -56,7 +61,7 @@
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^17.2.0",
"@metamask/keyring-controller": "^17.2.1",
"@metamask/snaps-controllers": "^9.7.0",
"@types/jest": "^27.4.1",
"@types/readable-stream": "^2.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-controller/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.packages.build.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/types",
"outDir": "./dist",
"rootDir": "./src",
"skipLibCheck": true
},
Expand Down
21 changes: 20 additions & 1 deletion packages/address-book-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.0.1]

### Fixed

- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648))
- 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.
- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)).
- 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.

## [6.0.0]

### Added
Expand Down Expand Up @@ -168,7 +186,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

All changes listed after this point were applied to this package following the monorepo conversion.

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[6.0.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[6.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[5.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[4.0.2]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
23 changes: 14 additions & 9 deletions packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/address-book-controller",
"version": "6.0.0",
"version": "6.0.1",
"description": "Manages a list of recipient addresses associated with nicknames",
"keywords": [
"MetaMask",
Expand All @@ -18,19 +18,24 @@
"sideEffects": false,
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/types/index.d.ts"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"types": "./dist/types/index.d.ts",
"main": "./dist/index.cjs",
"types": "./dist/index.d.cts",
"files": [
"dist/"
],
"scripts": {
"build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean",
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
"build:docs": "typedoc",
"changelog:update": "../../scripts/update-changelog.sh @metamask/address-book-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/address-book-controller",
Expand All @@ -42,8 +47,8 @@
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^7.0.0",
"@metamask/controller-utils": "^11.2.0",
"@metamask/base-controller": "^7.0.1",
"@metamask/controller-utils": "^11.3.0",
"@metamask/utils": "^9.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/address-book-controller/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.packages.build.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/types",
"outDir": "./dist",
"rootDir": "./src"
},
"references": [
Expand Down
25 changes: 24 additions & 1 deletion packages/announcement-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [7.0.1]

### Changed

- Bump TypeScript from `~4.9.5` to `~5.2.2` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584))

### Fixed

- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648))
- 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.
- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)).
- 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.

## [7.0.0]

### Changed
Expand Down Expand Up @@ -142,7 +164,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

All changes listed after this point were applied to this package following the monorepo conversion.

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[7.0.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[6.1.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[6.1.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
21 changes: 13 additions & 8 deletions packages/announcement-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/announcement-controller",
"version": "7.0.0",
"version": "7.0.1",
"description": "Manages in-app announcements",
"keywords": [
"MetaMask",
Expand All @@ -18,19 +18,24 @@
"sideEffects": false,
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/types/index.d.ts"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"types": "./dist/types/index.d.ts",
"main": "./dist/index.cjs",
"types": "./dist/index.d.cts",
"files": [
"dist/"
],
"scripts": {
"build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean",
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
"build:docs": "typedoc",
"changelog:update": "../../scripts/update-changelog.sh @metamask/announcement-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/announcement-controller",
Expand All @@ -42,7 +47,7 @@
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^7.0.0"
"@metamask/base-controller": "^7.0.1"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/announcement-controller/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.packages.build.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/types",
"outDir": "./dist",
"rootDir": "./src"
},
"references": [{ "path": "../base-controller/tsconfig.build.json" }],
Expand Down
Loading

0 comments on commit 48c6517

Please sign in to comment.