From 1610fecc3e60b2d50e897051586612653ba479f6 Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Fri, 19 Sep 2025 11:22:01 -0700 Subject: [PATCH] Rollback shrinkwrap (#8926) --- .github/CODEOWNERS | 4 +-- .github/actions/publish-release/action.yml | 10 ++---- .github/workflows/e2e.yml | 36 ++++++++++++++++++- .github/workflows/promote-release.yml | 3 -- .prettierignore | 1 - npm-shrinkwrap.json => package-lock.json | 0 package.json | 3 +- packages/cli/package.json | 3 +- .../scripts/generate-notices.js | 4 +-- scripts/check-lockfile.js | 4 +-- scripts/prepare-package.js | 1 - scripts/version.js | 2 +- 12 files changed, 46 insertions(+), 25 deletions(-) rename npm-shrinkwrap.json => package-lock.json (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a4263466ec..b3d94bfd5f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,10 +4,10 @@ # Require reviews from the release approvers for critical files. # These patterns override the rule above. /package.json @google-gemini/gemini-cli-askmode-approvers -/npm-shrinkwrap.json @google-gemini/gemini-cli-askmode-approvers +/package-lock.json @google-gemini/gemini-cli-askmode-approvers /GEMINI.md @google-gemini/gemini-cli-askmode-approvers /SECURITY.md @google-gemini/gemini-cli-askmode-approvers /LICENSE @google-gemini/gemini-cli-askmode-approvers /.github/workflows/ @google-gemini/gemini-cli-askmode-approvers /packages/cli/package.json @google-gemini/gemini-cli-askmode-approvers -/packages/core/package.json @google-gemini/gemini-cli-askmode-approvers \ No newline at end of file +/packages/core/package.json @google-gemini/gemini-cli-askmode-approvers diff --git a/.github/actions/publish-release/action.yml b/.github/actions/publish-release/action.yml index 14af62f8ae..579903de9c 100644 --- a/.github/actions/publish-release/action.yml +++ b/.github/actions/publish-release/action.yml @@ -69,14 +69,8 @@ runs: BRANCH_NAME: '${{ steps.release_branch.outputs.BRANCH_NAME }}' DRY_RUN: '${{ inputs.dry-run }}' RELEASE_TAG: '${{ inputs.release-tag }}' - run: | - git add package.json packages/*/package.json - if [ -f npm-shrinkwrap.json ]; then - git add npm-shrinkwrap.json - fi - if [ -f package-lock.json ]; then - git add package-lock.json - fi + run: |- + git add package.json package-lock.json packages/*/package.json git commit -m "chore(release): ${RELEASE_TAG}" if [[ "${DRY_RUN}" == "false" ]]; then echo "Pushing release branch to remote..." diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6ac39c4222..19c54a8606 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -24,7 +24,41 @@ jobs: github.event_name == 'merge_group' || (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.label.name == 'maintainer:e2e:ok') - runs-on: '${{ matrix.os }}' + steps: + - name: 'Checkout' + uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 + + - name: 'Set up Node.js' + uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: 'Install dependencies' + run: 'npm ci' + + - name: 'Build project' + run: 'npm run build' + + - name: 'Archive build artifacts' + run: 'tar -cvf build-artifacts.tar bundle/ node_modules/ packages/ package.json' + + - name: 'Upload build artifacts' + uses: 'actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02' + with: + name: 'build-artifacts-${{ github.run_id }}' + path: 'build-artifacts.tar' + + e2e_linux: + name: 'E2E Test (Linux) - ${{ matrix.sandbox }}' + needs: + - 'build' + if: | + github.event_name == 'push' || + github.event_name == 'merge_group' || + (github.event.pull_request.head.repo.full_name == github.repository) || + (github.event.label.name == 'maintainer:e2e:ok') + runs-on: 'gemini-cli-ubuntu-16-core' strategy: fail-fast: false matrix: diff --git a/.github/workflows/promote-release.yml b/.github/workflows/promote-release.yml index e778bc047f..e93f9cf191 100644 --- a/.github/workflows/promote-release.yml +++ b/.github/workflows/promote-release.yml @@ -303,9 +303,6 @@ jobs: DRY_RUN: '${{ github.event.inputs.dry_run }}' run: |- git add package.json packages/*/package.json - if [ -f npm-shrinkwrap.json ]; then - git add npm-shrinkwrap.json - fi if [ -f package-lock.json ]; then git add package-lock.json fi diff --git a/.prettierignore b/.prettierignore index fbf5c453d6..f4330b7e68 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,5 +17,4 @@ eslint.config.js **/generated gha-creds-*.json junit.xml -npm-shrinkwrap.json Thumbs.db diff --git a/npm-shrinkwrap.json b/package-lock.json similarity index 100% rename from npm-shrinkwrap.json rename to package-lock.json diff --git a/package.json b/package.json index 94599a504f..5d3464fa5f 100644 --- a/package.json +++ b/package.json @@ -59,8 +59,7 @@ "files": [ "bundle/", "README.md", - "LICENSE", - "npm-shrinkwrap.json" + "LICENSE" ], "devDependencies": { "@types/marked": "^5.0.2", diff --git a/packages/cli/package.json b/packages/cli/package.json index b9dcc2520b..dc8ee2b419 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -22,8 +22,7 @@ "typecheck": "tsc --noEmit" }, "files": [ - "dist", - "npm-shrinkwrap.json" + "dist" ], "config": { "sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.6.0-preview.2" diff --git a/packages/vscode-ide-companion/scripts/generate-notices.js b/packages/vscode-ide-companion/scripts/generate-notices.js index 9f7901f0f6..b6c3341fac 100644 --- a/packages/vscode-ide-companion/scripts/generate-notices.js +++ b/packages/vscode-ide-companion/scripts/generate-notices.js @@ -94,7 +94,7 @@ function collectDependencies(packageName, packageLock, dependenciesMap) { const packageInfo = packageLock.packages[`node_modules/${packageName}`]; if (!packageInfo) { console.warn( - `Warning: Could not find package info for ${packageName} in npm-shrinkwrap.json.`, + `Warning: Could not find package info for ${packageName} in package-lock.json.`, ); return; } @@ -114,7 +114,7 @@ async function main() { const packageJsonContent = await fs.readFile(packageJsonPath, 'utf-8'); const packageJson = JSON.parse(packageJsonContent); - const packageLockJsonPath = path.join(projectRoot, 'npm-shrinkwrap.json'); + const packageLockJsonPath = path.join(projectRoot, 'package-lock.json'); const packageLockJsonContent = await fs.readFile( packageLockJsonPath, 'utf-8', diff --git a/scripts/check-lockfile.js b/scripts/check-lockfile.js index 6346ffd90f..7cda57a7d6 100644 --- a/scripts/check-lockfile.js +++ b/scripts/check-lockfile.js @@ -10,7 +10,7 @@ import { fileURLToPath } from 'node:url'; const __dirname = dirname(fileURLToPath(import.meta.url)); const root = join(__dirname, '..'); -const lockfilePath = join(root, 'npm-shrinkwrap.json'); +const lockfilePath = join(root, 'package-lock.json'); function readJsonFile(filePath) { try { @@ -64,7 +64,7 @@ for (const [location, details] of Object.entries(packages)) { if (invalidPackages.length > 0) { console.error( - '\nError: The following dependencies in npm-shrinkwrap.json are missing the "resolved" or "integrity" field:', + '\nError: The following dependencies in package-lock.json are missing the "resolved" or "integrity" field:', ); invalidPackages.forEach((pkg) => console.error(`- ${pkg}`)); process.exitCode = 1; diff --git a/scripts/prepare-package.js b/scripts/prepare-package.js index 313e61293b..ff1dc137ff 100644 --- a/scripts/prepare-package.js +++ b/scripts/prepare-package.js @@ -46,7 +46,6 @@ copyFiles('core', { copyFiles('cli', { 'README.md': 'README.md', LICENSE: 'LICENSE', - 'npm-shrinkwrap.json': 'npm-shrinkwrap.json', }); console.log('Successfully prepared all packages.'); diff --git a/scripts/version.js b/scripts/version.js index 38c45fe2e4..24b687f446 100644 --- a/scripts/version.js +++ b/scripts/version.js @@ -75,7 +75,7 @@ if (cliPackageJson.config?.sandboxImageUri) { writeJson(cliPackageJsonPath, cliPackageJson); } -// 6. Run `npm install` to update npm-shrinkwrap.json. +// 6. Run `npm install` to update package-lock.json. run('npm install'); console.log(`Successfully bumped versions to v${newVersion}.`);