Merged
Conversation
The package-lock.json was out of sync with package.json after removing the monorepo structure, causing npm ci to fail in CI. Regenerated the lock file to resolve dependency mismatches.
Update test and config file paths that were still referencing the old monorepo structure (packages/cli).
After switching from /lib to /dist in commit 1fad4d5, the oclif.config.mjs wasn't updated to point to the new directory. This caused commands to not be discovered. Also set OCLIF_TEST_ROOT environment variable in test init to help @oclif/test find the CLI root after monorepo removal.
The apps:create command creates actual git remotes when running in a git repository. In tests, this was creating a 'heroku' remote pointing to 'foobar' which then interfered with other tests that check for app names from git remotes. Added cleanup in afterEach to remove any heroku remotes created during the tests.
After removing the monorepo structure, the example Procfile that local command tests depended on was deleted. Created a test fixture at test/fixtures/local/Procfile with the same content. Updated tests that verify default Procfile loading to change directory to the fixtures location before running, ensuring they can find the default Procfile without explicitly specifying the path.
194d6e7 to
f1e4770
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes the monorepo structure and Lerna dependency from the Heroku CLI. All CLI code has been moved from
packages/cli/to the root directory, and the project now uses standard npm publishing instead of Lerna.Motivation
Changes Overview
1. Project Structure
packages/cli/src/→src/packages/cli/test/→test/packages/cli/to rootlerna.jsonand monorepo configurationpackages/cli/package.json(consolidated into root package.json)2. Configuration Updates
oclif.config.mjswith proper paths pointing to./distdirectorypackage.jsonfrom workspace root to actual CLI packageREADME.mdfrom symlink to actual file.eslintrc.cjsto reference rootdist/directory.versionrc.json,.gitignore,cspell.jsonwith new paths3. Build and Publishing
bin/runas actual file (was symlink to packages/cli/bin/run)cd packages/clicommands:.github/workflows/ci.yml- simplified test commands.github/workflows/publish-npm.yml- replacedlerna publishwithnpm publish.github/workflows/pack-upload.yml- updated paths.github/workflows/create-cli-release.yml- updated pathspackage.jsonscripts to run from root4. Code Changes
src/lib/pg/backups.ts(changed path reference after move)Statistics
Files to Review
While there are 860+ files changed, most are simple file moves that don't require review. Please focus your review on:
Critical Configuration Files
package.json- consolidated package configurationoclif.config.mjs- new oclif configuration with updated pathsbin/run- CLI entry point (was symlink, now actual file)GitHub Workflows (Publishing)
.github/workflows/publish-npm.yml- now usesnpm publishinstead oflerna publish.github/workflows/ci.yml- simplified test commandsGitHub Workflows (Supporting)
.github/workflows/pack-upload.yml.github/workflows/create-cli-release.yml.github/workflows/devcenter-doc-update.yml.github/workflows/publish-to-fig-autocomplete.yml.github/workflows/start-prerelease.yml.github/workflows/tag-create-github-release.ymlBuild & Test Configuration
nyc-config.js- code coverage configuration.eslintrc.cjs- linting configuration.eslintignore- ignored paths.gitignore- ignored files.versionrc.json- versioning configurationcspell.json- spell check configurationScripts
scripts/comment-commands.shscripts/create-release-prscripts/release/*- all release scriptsscripts/sign/debscripts/upload/debscripts/utils/*- utility scriptsCode Changes
src/lib/pg/backups.ts- small import fix after file moveDocumentation
README.md- converted from symlink to actual fileTesting
All existing tests should pass without modification:
Deployment Notes
herokuon npmlerna publishtonpm publishhttps://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002TufpBYAR/view