diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 1583d158f2..7fba40cb93 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -73,29 +73,6 @@ jobs: exit 1 fi - post-build: - name: Post-build - runs-on: ubuntu-latest - needs: - - build - steps: - - uses: actions/checkout@v3 - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: yarn - - run: yarn --immutable --immutable-cache - - name: Restore build files - uses: actions/cache@v3 - with: - path: | - packages/*/dist - key: build-source-${{ runner.os }}-${{ github.sha }} - fail-on-cache-miss: true - - name: Post-build - run: yarn build:post-tsc:ci - build-simulator: name: Build "@metamask/snaps-simulator" runs-on: ubuntu-latest diff --git a/.yarn/plugins/local/plugin-workspaces-filter.js b/.yarn/plugins/local/plugin-workspaces-filter.js index 4648a86967..38808392b8 100644 --- a/.yarn/plugins/local/plugin-workspaces-filter.js +++ b/.yarn/plugins/local/plugin-workspaces-filter.js @@ -154,6 +154,11 @@ module.exports = { validator: isString, }); + noPrivate = Option.Boolean(`--no-private`, false, { + description: `Exclude private workspaces`, + validator: isBoolean, + }); + /** * Run the given command on the workspaces. * @@ -205,6 +210,8 @@ module.exports = { (!this.exclude || !minimatch(workspace.relativeCwd, this.exclude)) ); + }).filter((workspace) => { + return !this.noPrivate || !workspace.manifest.private; }); return await this.run(filteredWorkspaces, this.commandName, this.args); diff --git a/package.json b/package.json index c0293351e5..b5bbd697fd 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "packages/*" ], "scripts": { - "setup": "yarn install", "postinstall": "simple-git-hooks", "lint:eslint": "eslint . --cache --ext js,jsx,ts,tsx", "lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' '**/*.html'", @@ -21,13 +20,11 @@ "lint:fix": "yarn workspaces foreach --parallel run lint:eslint --fix && yarn lint:misc --write && yarn lint:tsconfig && yarn constraints --fix", "lint:ci": "yarn lint:eslint && yarn lint:misc --check && yarn lint:tsconfig && yarn constraints && yarn lint:dependencies", "build": "yarn build:source && yarn build:types && yarn build:post-tsc", - "build:ci": "yarn workspaces foreach --parallel --verbose --exclude root run build:ci", + "build:ci": "yarn workspaces filter --include \"packages/*\" --parallel --topological --no-private run build:ci", "build:clean": "yarn clean && yarn build", "build:source": "yarn workspaces foreach --parallel --topological --topological-dev --verbose --exclude root --exclude \"@metamask/example-snaps\" --exclude \"@metamask/invoke-snap-example-snap\" run build", "build:types": "tsc --build tsconfig.build.json", "build:examples": "yarn workspace @metamask/example-snaps build", - "build:post-tsc": "yarn workspaces foreach --parallel --topological --topological-dev --verbose run build:post-tsc", - "build:post-tsc:ci": "yarn workspaces foreach --parallel --topological --topological-dev --verbose --exclude root --exclude \"@metamask/snaps-simulator\" --exclude \"@metamask/snaps-execution-environments\" --exclude \"@metamask/snaps-jest\" --exclude \"@metamask/example-snaps\" --exclude \"@metamask/test-snaps\" run build:post-tsc", "clean": "yarn workspaces foreach --parallel --verbose run clean", "test": "yarn workspaces foreach --parallel --verbose run test", "test:browser": "yarn workspaces foreach --verbose run test:browser", diff --git a/packages/examples/packages/browserify/snap.manifest.json b/packages/examples/packages/browserify/snap.manifest.json index 3c044eb08d..f75b795b6b 100644 --- a/packages/examples/packages/browserify/snap.manifest.json +++ b/packages/examples/packages/browserify/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "2qnG8o5QU4UL2GvdOiNuTggQXgojdeI0Q6NacfqhQUY=", + "shasum": "UJd7UNYCYn62/WKPLQFQWs1AnnOjti4fbQFSFEDwmRs=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/invoke-snap/package.json b/packages/examples/packages/invoke-snap/package.json index a67a26facc..0b3b7b8a76 100644 --- a/packages/examples/packages/invoke-snap/package.json +++ b/packages/examples/packages/invoke-snap/package.json @@ -14,7 +14,6 @@ "scripts": { "build": "yarn workspaces foreach --parallel --verbose run build", "build:clean": "yarn clean && yarn build", - "build:post-tsc": "yarn build", "clean": "yarn workspaces foreach --parallel --verbose run clean", "start": "yarn workspaces foreach --parallel --verbose --interlaced --jobs unlimited run start", "test": "yarn workspaces foreach --parallel --verbose --interlaced run test", diff --git a/packages/snaps-cli/package.json b/packages/snaps-cli/package.json index b00d6f491f..9bfb8eb815 100644 --- a/packages/snaps-cli/package.json +++ b/packages/snaps-cli/package.json @@ -26,9 +26,8 @@ "dist" ], "scripts": { - "build": "tsup --clean && yarn build:types", + "build": "tsup --clean && yarn build:types && yarn build:chmod && yarn build:readme", "build:types": "tsc --project tsconfig.build.json", - "build:post-tsc": "yarn build:chmod && yarn build:readme", "build:chmod": "chmod +x ./dist/main.mjs && chmod +x ./dist/main.js", "build:readme": "node ./scripts/updateReadme.js", "build:watch": "tsc-watch --onSuccess 'yarn build:chmod'", diff --git a/packages/snaps-execution-environments/package.json b/packages/snaps-execution-environments/package.json index 6a8073cb32..ba8d7062bb 100644 --- a/packages/snaps-execution-environments/package.json +++ b/packages/snaps-execution-environments/package.json @@ -41,7 +41,6 @@ "clean": "rimraf '*.tsbuildinfo' 'dist' 'src/__GENERATED__/' 'coverage/*' '__test__/*'", "build": "tsup --clean && yarn build:types", "build:types": "tsc --project tsconfig.build.json", - "build:post-tsc": "yarn build:lavamoat", "build:lavamoat": "lavamoat scripts/build.js --policy lavamoat/build-system/policy.json --policyOverride lavamoat/build-system/policy-override.json", "build:lavamoat:policy": "yarn build:lavamoat --writeAutoPolicy && node scripts/build.js --writeAutoPolicy", "auto-changelog-init": "auto-changelog init", diff --git a/packages/snaps-simulator/package.json b/packages/snaps-simulator/package.json index fb1b2087b0..876efd67a0 100644 --- a/packages/snaps-simulator/package.json +++ b/packages/snaps-simulator/package.json @@ -1,36 +1,14 @@ { "name": "@metamask/snaps-simulator", "version": "2.4.3", + "private": true, "description": "A simulator for MetaMask Snaps, to be used for testing and development", "homepage": "https://github.com/MetaMask/snaps#readme", - "bugs": { - "url": "https://github.com/MetaMask/snaps/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/MetaMask/snaps.git" - }, "sideEffects": false, - "exports": { - ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" - }, - "./package.json": "./package.json" - }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/types/index.d.ts", - "files": [ - "dist" - ], "scripts": { - "build": "tsup --clean && yarn build:types && yarn build:webpack", - "build:types": "tsc --project tsconfig.build.json", + "build": "yarn build:vendor && yarn build:webpack", "build:webpack": "yarn webpack --config-name main --config-name test --mode production --progress", "build:vendor": "webpack --config-name vendor --mode production --progress", - "build:post-tsc": "yarn build:vendor && yarn build:webpack", "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:changelog && yarn lint:dependencies", "lint:changelog": "../../scripts/validate-changelog.sh @metamask/snaps-simulator", "lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx", @@ -150,10 +128,5 @@ "engines": { "node": "^18.16 || >=20" }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "build:types": "tsc --project tsconfig.build.json", "packageManager": "yarn@3.2.1" } diff --git a/packages/test-snaps/package.json b/packages/test-snaps/package.json index 6f9fab3a55..676868242e 100644 --- a/packages/test-snaps/package.json +++ b/packages/test-snaps/package.json @@ -18,7 +18,6 @@ "start:test": "cross-env NODE_ENV=development webpack serve", "build": "cross-env NODE_ENV=production webpack", "build:clean": "yarn clean && yarn build", - "build:post-tsc": "yarn build", "clean": "rimraf 'dist'", "lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx", "lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" --ignore-path ../../.gitignore",