-
Notifications
You must be signed in to change notification settings - Fork 128
chore: update prep for releasing ESM and yargs-based CLI as version 2.0 #806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update prep for releasing ESM and yargs-based CLI as version 2.0 #806
Conversation
🦋 Changeset detectedLatest commit: cf61030 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
||
| - name: Configure Git Identity | ||
| uses: Homebrew/actions/git-user-config@master | ||
| uses: Homebrew/actions/git-user-config@main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's gross that we have to use main here rather than a specific version. This action doesn't seem to use versions though. We might want to look for alternatives at some point.
.github/copilot-instructions.md
Outdated
| - **Respond Specifically to Prompts**: Never do things not explicitly requested. | ||
|
|
||
| ## Variable Naming Rules | ||
| - **No Single-Letter Variables:** Never use single-letter variable names (e.g., `i`, `e`, `v`, `k`, `v`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an extra v here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this file completely.
.github/copilot-instructions.md
Outdated
| // ... | ||
| } catch (e) { | ||
| console.error(e); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a "Correct" example as well? Or is that just extra useless tokens for the AI to process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this file completely.
CHANGELOG.md
Outdated
| rather than oclif. A reasonable attempt has been made at finding the old config and copying it for | ||
| the user so normally no change is needed other than making changes in the new file if necessary. | ||
| The `config` command now displays the name of the configuration file. | ||
| the user so normally no change is needed other than making changes going forward in the new file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure I understand. Do you mean something like "...so normally no change is needed. Any future manual changes will need to be made in the new file rather than the old file"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reworded this a bit more:
The config file location is now determined by envPaths library rather than oclif. A reasonable attempt has been made at finding the old config and copying it for the user so normally no change is needed. (Future changes will need to be made to the new file, of course.) The
configcommand now displays the location of the configuration file.
| if: runner.os != 'Windows' | ||
| run: ls -l | ||
|
|
||
| # Make sure 'smartthings' binary is available to child processes (i.e. included in PATH). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the new version is less specific about what's being added to the path--now it seems to add the whole Github workspace, whereas previously it added a specific child directory. Is this intended? Are there potential consequences to adding the whole parent directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PATH directories are not recursive so this is just a different directory rather than being less specific. The change is needed because now the binary is just unzipped directly into the main workspace directory.
| ) | ||
|
|
||
| process.expect('@smartthings/cli/.+ .+ node-.+') | ||
| process.expect('^\\d+\\.\\d+\\.\\d+') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having trouble figuring out what this change is. Is this because it's not a monorepo anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output with the --version changed with yargs so this functional test fails without this change. The old regex matches oclif's version output and the new one matches yargs' output.
Here's the old CLI's output:
~/dev/cli/smartthings-cli ➜ smartthings --version
@smartthings/cli/1.10.6 darwin-arm64 node-v18.5.0
but with yargs, it now looks like this:
~/dev/cli/smartthings-cli ➜ smartthings --version
2.0.0-prerelease2
45a3fdf to
f9e9b9a
Compare
f9e9b9a to
cf61030
Compare
npx changesetto generate changeset info for major updatetsconfig-test.jsonfrom eslint confignpm-releasepkgneeded butnexedoes notbuild-binariesscript to put compressed binaries directly indist_bindirectory which makes the cd script a little cleaner--versionoutput since the version output is now simpler