diff --git a/package.json b/package.json index 47657d3f14..c4415ffd25 100644 --- a/package.json +++ b/package.json @@ -42,9 +42,9 @@ "test:integration:sandbox:none": "cross-env GEMINI_SANDBOX=false vitest run --root ./integration-tests", "test:integration:sandbox:docker": "cross-env GEMINI_SANDBOX=docker npm run build:sandbox && cross-env GEMINI_SANDBOX=docker vitest run --root ./integration-tests", "test:integration:sandbox:podman": "cross-env GEMINI_SANDBOX=podman vitest run --root ./integration-tests", - "lint": "eslint . --ext .ts,.tsx && eslint integration-tests", - "lint:fix": "eslint . --fix && eslint integration-tests --fix", - "lint:ci": "eslint . --ext .ts,.tsx --max-warnings 0 && eslint integration-tests --max-warnings 0", + "lint": "eslint . --ext .ts,.tsx && eslint integration-tests && eslint scripts", + "lint:fix": "eslint . --fix --ext .ts,.tsx && eslint integration-tests --fix && eslint scripts --fix && npm run format", + "lint:ci": "npm run lint:all", "lint:all": "node scripts/lint.js", "format": "prettier --experimental-cli --write .", "typecheck": "npm run typecheck --workspaces --if-present", diff --git a/scripts/get-release-version.js b/scripts/get-release-version.js index 33d955b684..442eb4444d 100644 --- a/scripts/get-release-version.js +++ b/scripts/get-release-version.js @@ -424,7 +424,13 @@ export function getVersion(options = {}) { } break; case 'promote-nightly': - versionData = promoteNightlyVersion(); + versionData = promoteNightlyVersion({ args }); + // A promoted nightly version is still a nightly, so we should check for conflicts. + if (doesVersionExist({ args, version: versionData.releaseVersion })) { + throw new Error( + `Version conflict! Promoted nightly version ${versionData.releaseVersion} already exists.`, + ); + } break; case 'stable': versionData = getStableVersion(args); diff --git a/scripts/lint.js b/scripts/lint.js index 008f7cb209..a9613dfac9 100644 --- a/scripts/lint.js +++ b/scripts/lint.js @@ -142,7 +142,7 @@ export function setupLinters() { export function runESLint() { console.log('\nRunning ESLint...'); - if (!runCommand('npm run lint:ci')) { + if (!runCommand('npm run lint')) { process.exit(1); } }