From 3b83227e113e788ea0af382795c48bee49b7c363 Mon Sep 17 00:00:00 2001 From: dafuga Date: Thu, 7 Nov 2024 15:45:27 -0800 Subject: [PATCH 1/6] fix: making the snap publishable --- .yarnrc.yml | 2 + package.json | 2 +- packages/snap/package.json | 4 +- packages/snap/snap.manifest.json | 4 +- yarn.lock | 114 +++++++++++++++---------------- 5 files changed, 64 insertions(+), 62 deletions(-) diff --git a/.yarnrc.yml b/.yarnrc.yml index 0cdb443..fba2f20 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -8,6 +8,8 @@ logFilters: nodeLinker: node-modules +npmRegistryServer: 'https://registry.npmjs.org' + plugins: - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs spec: '@yarnpkg/plugin-workspace-tools' diff --git a/package.json b/package.json index 925ac63..962ad1d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@greymass/antelope-snap", + "name": "root", "version": "1.0.0", "private": true, "description": "Template for deploying Antelope-based snaps. See branches for specific networks.", diff --git a/packages/snap/package.json b/packages/snap/package.json index 8912bf7..e74a87f 100644 --- a/packages/snap/package.json +++ b/packages/snap/package.json @@ -1,6 +1,6 @@ { - "name": "snap", - "version": "1.0.0", + "name": "@greymass/eos-wallet", + "version": "1.0.1", "description": "MetaMask Snap allowing users to interact with Antelope networks", "repository": { "type": "git", diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index 1a8d36e..04afe8a 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -7,12 +7,12 @@ "url": "https://github.com/@greymass/antelope-snap.git" }, "source": { - "shasum": "j6wHsDvhLhjGelQftpzx8OIESP3/9C0xeRDoLdSJ+/Q=", + "shasum": "3Zx4bfEsCEMPR5PCWwZQeyhFafMyzxkKe/aId+6OkRg=", "location": { "npm": { "filePath": "dist/bundle.js", "iconPath": "src/assets/eos-logo.svg", - "packageName": "snap", + "packageName": "@greymass/eos-wallet", "registry": "https://registry.npmjs.org/" } } diff --git a/yarn.lock b/yarn.lock index 72465af..de22cbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1729,19 +1729,38 @@ __metadata: languageName: node linkType: hard -"@greymass/antelope-snap@workspace:.": +"@greymass/create-account@npm:^1.0.2": + version: 1.0.2 + resolution: "@greymass/create-account@npm:1.0.2" + dependencies: + "@greymass/return-path": ^0.0.1 + "@wharfkit/antelope": ^0.7.3 + "@wharfkit/signing-request": ^3.0.0 + tslib: ^2.1.0 + checksum: aad3d0feb158f77bc386dab689c167dfd3ae73259734a6affd8b826aab2c26680f6067c89bee3d3f5ea763ed48998980b41d49ddf8f1e6cf92f146c92df5e32f + languageName: node + linkType: hard + +"@greymass/eos-wallet@workspace:packages/snap": version: 0.0.0-use.local - resolution: "@greymass/antelope-snap@workspace:." + resolution: "@greymass/eos-wallet@workspace:packages/snap" dependencies: - "@lavamoat/allow-scripts": ^3.0.0 - "@lavamoat/preinstall-always-fail": ^2.0.0 + "@jest/globals": ^29.5.0 + "@metamask/auto-changelog": ^3.4.4 "@metamask/eslint-config": ^12.2.0 "@metamask/eslint-config-jest": ^12.1.0 "@metamask/eslint-config-nodejs": ^12.1.0 "@metamask/eslint-config-typescript": ^12.1.0 + "@metamask/key-tree": ^9.1.1 + "@metamask/snaps-cli": ^6.1.0 + "@metamask/snaps-jest": ^7.0.0 + "@metamask/snaps-sdk": ^4.0.0 "@typescript-eslint/eslint-plugin": ^5.42.1 "@typescript-eslint/parser": ^5.42.1 - eslint: ^9.0.0 + "@wharfkit/antelope": ^1.0.7 + "@wharfkit/common": ^1.2.2 + buffer: ^6.0.3 + eslint: ^8.45.0 eslint-config-prettier: ^8.5.0 eslint-plugin-import: ~2.26.0 eslint-plugin-jest: ^27.1.5 @@ -1749,27 +1768,15 @@ __metadata: eslint-plugin-n: ^15.7.0 eslint-plugin-prettier: ^4.2.1 eslint-plugin-promise: ^6.1.1 + jest: ^29.5.0 prettier: ^2.7.1 - prettier-plugin-packagejson: ^2.2.18 - prettier-plugin-svelte: ^3.2.4 - sharp: ^0.32.6 + prettier-plugin-packagejson: ^2.2.11 + rimraf: ^3.0.2 + ts-jest: ^29.1.0 typescript: ^4.7.4 - typescript-eslint: ^8.0.0-alpha.20 languageName: unknown linkType: soft -"@greymass/create-account@npm:^1.0.2": - version: 1.0.2 - resolution: "@greymass/create-account@npm:1.0.2" - dependencies: - "@greymass/return-path": ^0.0.1 - "@wharfkit/antelope": ^0.7.3 - "@wharfkit/signing-request": ^3.0.0 - tslib: ^2.1.0 - checksum: aad3d0feb158f77bc386dab689c167dfd3ae73259734a6affd8b826aab2c26680f6067c89bee3d3f5ea763ed48998980b41d49ddf8f1e6cf92f146c92df5e32f - languageName: node - linkType: hard - "@greymass/return-path@npm:^0.0.1": version: 0.0.1 resolution: "@greymass/return-path@npm:0.0.1" @@ -10965,6 +10972,35 @@ __metadata: languageName: node linkType: hard +"root@workspace:.": + version: 0.0.0-use.local + resolution: "root@workspace:." + dependencies: + "@lavamoat/allow-scripts": ^3.0.0 + "@lavamoat/preinstall-always-fail": ^2.0.0 + "@metamask/eslint-config": ^12.2.0 + "@metamask/eslint-config-jest": ^12.1.0 + "@metamask/eslint-config-nodejs": ^12.1.0 + "@metamask/eslint-config-typescript": ^12.1.0 + "@typescript-eslint/eslint-plugin": ^5.42.1 + "@typescript-eslint/parser": ^5.42.1 + eslint: ^9.0.0 + eslint-config-prettier: ^8.5.0 + eslint-plugin-import: ~2.26.0 + eslint-plugin-jest: ^27.1.5 + eslint-plugin-jsdoc: ^41.1.2 + eslint-plugin-n: ^15.7.0 + eslint-plugin-prettier: ^4.2.1 + eslint-plugin-promise: ^6.1.1 + prettier: ^2.7.1 + prettier-plugin-packagejson: ^2.2.18 + prettier-plugin-svelte: ^3.2.4 + sharp: ^0.32.6 + typescript: ^4.7.4 + typescript-eslint: ^8.0.0-alpha.20 + languageName: unknown + linkType: soft + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -11386,42 +11422,6 @@ __metadata: languageName: node linkType: hard -"snap@workspace:packages/snap": - version: 0.0.0-use.local - resolution: "snap@workspace:packages/snap" - dependencies: - "@jest/globals": ^29.5.0 - "@metamask/auto-changelog": ^3.4.4 - "@metamask/eslint-config": ^12.2.0 - "@metamask/eslint-config-jest": ^12.1.0 - "@metamask/eslint-config-nodejs": ^12.1.0 - "@metamask/eslint-config-typescript": ^12.1.0 - "@metamask/key-tree": ^9.1.1 - "@metamask/snaps-cli": ^6.1.0 - "@metamask/snaps-jest": ^7.0.0 - "@metamask/snaps-sdk": ^4.0.0 - "@typescript-eslint/eslint-plugin": ^5.42.1 - "@typescript-eslint/parser": ^5.42.1 - "@wharfkit/antelope": ^1.0.7 - "@wharfkit/common": ^1.2.2 - buffer: ^6.0.3 - eslint: ^8.45.0 - eslint-config-prettier: ^8.5.0 - eslint-plugin-import: ~2.26.0 - eslint-plugin-jest: ^27.1.5 - eslint-plugin-jsdoc: ^41.1.2 - eslint-plugin-n: ^15.7.0 - eslint-plugin-prettier: ^4.2.1 - eslint-plugin-promise: ^6.1.1 - jest: ^29.5.0 - prettier: ^2.7.1 - prettier-plugin-packagejson: ^2.2.11 - rimraf: ^3.0.2 - ts-jest: ^29.1.0 - typescript: ^4.7.4 - languageName: unknown - linkType: soft - "socks-proxy-agent@npm:^8.0.3": version: 8.0.4 resolution: "socks-proxy-agent@npm:8.0.4" From 31ce2d56241381f93af9943fbd2f08ae751b27d9 Mon Sep 17 00:00:00 2001 From: dafuga Date: Thu, 7 Nov 2024 15:48:19 -0800 Subject: [PATCH 2/6] chore: added publish script --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 962ad1d..d370eff 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "lint:eslint": "eslint . --cache -c js,jsx,ts,tsx", "lint:fix": "yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' --ignore-path .gitignore", + "publish:snap": "yarn workspace @greymass/eos-wallet npm publish --access public --tag next", "start": "yarn workspaces foreach --parallel --interlaced --verbose run start", "test": "yarn workspace snap run test --passWithNoTests" }, From e04c2b0bc8855e914460c4b15da1139c8ceb1918 Mon Sep 17 00:00:00 2001 From: dafuga Date: Thu, 7 Nov 2024 15:51:00 -0800 Subject: [PATCH 3/6] chore: updated shasum --- packages/snap/snap.manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index 04afe8a..7ac16fa 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.1", "description": "Use MetaMask with the BLOCKCHAIN Network", "proposedName": "BLOCKCHAIN Wallet", "repository": { @@ -7,7 +7,7 @@ "url": "https://github.com/@greymass/antelope-snap.git" }, "source": { - "shasum": "3Zx4bfEsCEMPR5PCWwZQeyhFafMyzxkKe/aId+6OkRg=", + "shasum": "QZEb6DgW92HtGAuSJNpfWGNKBWGv/A3xlll2fiL4H5c=", "location": { "npm": { "filePath": "dist/bundle.js", From 14e7a8a62cc1a7633b78c12b5c9f099857e3c1e3 Mon Sep 17 00:00:00 2001 From: dafuga Date: Thu, 7 Nov 2024 16:00:16 -0800 Subject: [PATCH 4/6] fix: using proper workspace name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d370eff..fd5b340 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' --ignore-path .gitignore", "publish:snap": "yarn workspace @greymass/eos-wallet npm publish --access public --tag next", "start": "yarn workspaces foreach --parallel --interlaced --verbose run start", - "test": "yarn workspace snap run test --passWithNoTests" + "test": "yarn workspace @greymass/eos-wallet run test --passWithNoTests" }, "devDependencies": { "@lavamoat/allow-scripts": "^3.0.0", From 0179c3219b09b6ad2f9914c2feba75e62b5c8cd9 Mon Sep 17 00:00:00 2001 From: dafuga Date: Thu, 7 Nov 2024 16:05:42 -0800 Subject: [PATCH 5/6] chore: adding a separate command to publish with next tag --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index fd5b340..cdf21c4 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "lint:eslint": "eslint . --cache -c js,jsx,ts,tsx", "lint:fix": "yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' --ignore-path .gitignore", - "publish:snap": "yarn workspace @greymass/eos-wallet npm publish --access public --tag next", + "publish:snap": "yarn workspace @greymass/eos-wallet npm publish --access public", + "publish:snap:next": "yarn workspace @greymass/eos-wallet npm publish --access public --tag next", "start": "yarn workspaces foreach --parallel --interlaced --verbose run start", "test": "yarn workspace @greymass/eos-wallet run test --passWithNoTests" }, From 2fb13e7fac6b8a18062d4a51064789e2fb47dd17 Mon Sep 17 00:00:00 2001 From: dafuga Date: Thu, 7 Nov 2024 16:20:07 -0800 Subject: [PATCH 6/6] fix: updating workspace used in the e2e test --- .github/workflows/build-lint-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index e5457ca..8730ae2 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -90,7 +90,7 @@ jobs: key: snap-${{ runner.os }}-${{ github.sha }} - run: yarn install --immutable - name: Run e2e tests - run: yarn workspace snap run test + run: yarn workspace @greymass/eos-wallet run test - name: Require clean working directory shell: bash run: |