-
Notifications
You must be signed in to change notification settings - Fork 56
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
Remove Lerna and (mostly) set up TypeScript #1183
base: main
Are you sure you want to change the base?
Conversation
- name: Verify package dependencies | ||
run: | | ||
yarn check-deps | ||
npx depcheck |
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.
Now that we don't have multiple packages in the repo, this is a bit simpler and we don't need the custom script. Figured it makes sense to just use npx
(they suggest it on their npm docs https://www.npmjs.com/package/depcheck)
|
||
1. Run `yarn publish-prerelease`. The publish command will handle bumping the version, tagging via git, and publishing the packages to NPM under the `next` dist-tag. | ||
1. If there are publishing errors, you can run again via `yarn lerna publish from-package --dist-tag next` ([Docs][from-package]). | ||
|
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 was going to update this with the new release commands, but wasn't sure if it even made a ton of sense to have release documentation on a public repo
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.
Yeah I'm fine with removing this 👍 we can keep it internal
lib/serverlessLogs.js
Outdated
} = require('../../../../hubspot-local-dev-lib/dist/config'); | ||
const { | ||
fetchScopeData, | ||
} = require('../../../../hubspot-local-dev-lib/dist/api/localDevAuth'); |
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.
somehow these imports got messed up on the next
branch
package.json
Outdated
"release:patch": "yarn check-main && yarn version --patch && yarn pub && yarn push", | ||
"prerelease:major": "yarn check-main && yarn version --premajor --preeid=beta && yarn pub && yarn push", | ||
"prerelease:minor": "yarn check-main && yarn version --preminor --preeid=beta && yarn pub && yarn push", | ||
"prerelease:patch": "yarn check-main && yarn version --prepatch --preeid=beta && yarn pub && yarn push", |
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.
These are our new release scripts. They match the ones in local-dev-lib but add 3 new ones to do prereleases
README.md
Outdated
|
||
```bash | ||
hs hubdb delete <id or name> | ||
``` |
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.
Do we want to take the opportunity to give a rundown of project and sandbox commands 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.
UPDATE after sync: Let's delete the commands list and link to the docs.
"name": "hubspot-local-dev-tools", | ||
"version": "1.0.0", | ||
"description": "Local development tools for working with HubSpot", | ||
"name": "@hubspot/cli", |
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.
Oh jeez, this needed an update!
"scripts": { | ||
"check-deps": "node bin/depcheck.js", |
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.
Can you remind me what's happening with depcheck
? Do we not need this command 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.
Still using it, but we didn't need a custom script anymore so we're just using npx (see my comment above on build.yml)
Description and Context
This PR pulls everything except the actual HubSpot CLI out of this repo, and changes it from a monorepo into a repo strictly dedicated to the CLI. It also does some basic setup for typescript, and adds a typescript build step that is integrated into local commands and the release flow. For the most part, this just moves everything that existed in
packages/cli
before to the root of the repo. In a few places (such as package.json) I did my best to combine the top level version with the version that existed in packages/cli.Some other things here off the top of my head
--dry-run
!) but the actual commands themselves to release will be differentworkspaces
anymore, which automatically installed deps inacceptance-tests
. I added ayarn install
to the beginning of the test command to make sure deps are installed when you run.bin
commands directly from the monorepo. Since that's not the case anymore, I set up a newscript
in the package.json for running commands locally. I figured we probably didn't need to runhscms
locally anymore, but I can add one for that too if we want toAs part of this PR,
webpack-cms-plugins
andserverless-dev-runtime
were removed from this repo. Here are their new repos:There have been some version updates since I made the repos, so we'll need to get those in sync with their current versions so we don't run into issues if/when we ever want to release those again. We will also need to update webpack-cms-plugins to be public
TODO
ts-jest
preset, but this resulted in type errors in the tests. There's probably an easy solution for this, but I figured it could wait until later since this PR is already so huge.Testing
npm publish --dry-run
and it seems like they work as expected. I set up this branch do test releases so feel free to check it out locally and try yourself https://github.com/HubSpot/hubspot-cli/tree/remove-lerna-test-releaseWho to Notify
@joe-yeager @kemmerle @brandenrodgers