Updates the 'prepare-github-release.js' script to create an '.npmrc' file in the root directory.
This ensures that the 'npm publish' command is properly authenticated with the GitHub Packages registry, preventing the 'ENEEDAUTH' error during the publish step.
Updates the 'lint.yml' workflow to use 'npm ci --only=dev'.
This ensures that only 'devDependencies' are installed, making the linting job faster and more efficient as it doesn't need to download and install the main application dependencies.
Removes the 'smoke test bundle' steps from the 'test_linux', 'test_mac', and 'test_windows' jobs in 'ci.yml'.
This step is redundant as the e2e workflow is responsible for testing the final bundled artifact.
Reorders the steps in the 'publish-bundle' job to run the bundle creation and size check *before* modifying the package.json files for release.
This prevents the 'package-lock.json' from becoming out-of-sync, which was causing the 'npm ci' command in the bundle size action to fail.
Removes the 'npm run generate' command from the 'test:ci' script in 'packages/cli/package.json'.
This step was redundant because the root 'test:ci' script now runs 'npm run build' (which includes 'generate') before executing the workspace tests.
Updates the 'test_linux', 'test_mac', and 'test_windows' jobs in 'ci.yml' to explicitly set 'strategy.fail-fast' to 'false'.
This ensures that all matrix variations for each job will run to completion, even if one of the variations fails. This provides a more complete picture of test status across all supported Node.js versions.
Moves the bundle size check from a separate job in 'ci.yml' to a step within the 'publish-bundle' job in 'build-and-publish.yml'.
This is a more logical location for the check and completely resolves the race condition where the '.npmrc' file created by the bundle size job could interfere with parallel unit test jobs.
Removes the 'npm run generate' command from the 'test:ci' script in the root package.json.
This step was redundant because the 'npm run build' command, which is run first, already includes the 'generate' step.
Updates the root 'test:ci' script to run 'npm run build' before the test execution steps.
This ensures that all workspace packages are compiled before Vitest runs, preventing 'Failed to resolve entry for package' errors when tests in one package import from another.
Updates the root 'test:ci' script to run 'npm run generate' before executing the workspace tests.
This ensures that the 'generated/git-commit.js' file is created before any unit tests are run, preventing the 'Cannot find module' error that was occurring in the CI environment.
Removes the redundant 'lint' job from 'build-and-publish.yml'.
This job was duplicating the linting efforts now handled by the dedicated 'lint.yml' workflow. The 'publish-bundle' job no longer declares an internal dependency on 'lint', as the orchestrator workflow ensures linting is completed before calling 'build-and-publish'.
Updates the checkout step in the 'lint.yml' workflow to use 'fetch-depth: 0'.
This is necessary to prevent intermittent failures in the sensitive keyword linter, which requires a full git history to reliably compare the current branch against 'origin/main'.
Explicitly sets 'fetch-depth: 1' in the checkout step of the 'lint.yml' workflow.
This makes the default behavior of fetching only the most recent commit explicit for clarity and consistency with other jobs that perform shallow clones.
Creates a new reusable workflow, 'lint.yml', to handle all linting operations.
The main 'orchestrator.yml' is updated to use this new workflow. The dependency chain is now explicitly defined: 'lint' runs first, followed by 'build-and-publish' and 'ci' in parallel. The 'e2e' job remains dependent on 'build-and-publish'.
This change also removes the now-unused 'version' input from 'ci.yml' and corrects the 'bundle_size' job to use 'npm ci'.
Replaces the explicit GitHub Packages configuration and published package installation with 'npm ci' in the 'test_linux', 'test_mac', and 'test_windows' jobs within 'ci.yml'.
This streamlines the unit testing process by focusing on the source code dependencies and avoids misleadingly installing the published package in the unit test phase. The 'bundle_size' job retains its specific install as it requires the published artifact.
Updates the 'test:ci' script in 'packages/cli/package.json' to run 'npm run generate' before 'vitest run'.
This ensures that the '../../generated/git-commit.js' file, which is required by some telemetry modules, is created before unit tests attempt to import it, resolving the 'Cannot find module' error during CI runs.
Prefixes the concurrency group names in 'ci.yml' and 'e2e.yml' with 'ci-' and 'e2e-' respectively.
This prevents the workflows from canceling each other out when they are triggered by the same orchestrator workflow, as the 'github.workflow' context variable was resolving to the same value for both.
Consolidates all job-level permissions into a single workflow-level block in 'ci.yml'.
This simplifies the workflow configuration and makes it easier to manage permissions. The workflow-level permissions now include all necessary permissions for the 'test_linux', 'test_mac', 'codeql', and 'bundle_size' jobs.
Adds 'packages: read' permission to the 'ci.yml' and 'e2e.yml' workflows. This is necessary to allow the jobs to download packages from the GitHub Packages registry, fixing the 403 Forbidden error during 'npm install'.
Also renames the 'orchestrator.yml' workflow from 'PR Checks' to 'Checks' for brevity.
This commit adds a step to the E2E workflow to create an .npmrc file and configure it with the necessary credentials for the GitHub Packages registry. This resolves the '401 Unauthorized' error that was occurring during the 'npm ci' step.
This PR introduces a new, automated workflow for developers to switch between the development (GitHub Packages) and production (npmjs.org) npm registries.
- A new script, , now automatically backs up and modifies the user's global file.
- has been updated with and scripts to run this new script.
- has been updated to reflect this new, simplified, and automated process, removing all manual steps for the user.
This commit unifies the bundling and publishing process for the CLI package across both npmjs.org and GitHub Packages.
- The script has been updated to only rename packages for the GitHub registry, removing the bundle copying and package.json modification logic.
- The has been modified to remove the flag from the CLI publish step, ensuring the root package (which includes the bundled executable) is published.
This ensures a consistent, bundled artifact is published to both registries.