-
Notifications
You must be signed in to change notification settings - Fork 2
Update build - don't cp directory, just bits we need #122
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 7465a42 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
9c3b9b5 to
93bce76
Compare
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
| bundleIfExists(`${base}/package.json`); | ||
| bundleIfExists(`${base}/*.md`); |
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.
This means that we "opt in" to the files we bundle instead of copying them all. The original code was copying the node_modules dirs over which isn't needed because ncc creates a single-file bundle that doesn't need any external libs.
somewhatabstract
left a comment
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.
This looks good however it's concerning that there are no tests for this code. It seems pretty complex and tests would help avoid issues.
| "get-changed-files": patch | ||
| --- | ||
|
|
||
| Fixed build |
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.
suggestion: It would be helpful if this were a little more descriptive about the change.
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 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'll expand, however, I view Changesets notes as end-user facing info. As a result, I don't think the description here should describe infrastructure changes that went into fixing the build - that's for the PR description. Someone consuming get-changed-files isn't going to know or understand the changes in this PR that led to a new release. The only reason I'm bumping get-changed-files is because the last release failed.
I'd love to hear your thoughts.
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.
Agreed, they are end-user facing. I think that understanding what was changed impacts both decisions around picking up the new changes, as well as helping figure out why things are going wrong. I think being clearer about how this affects the build is important for that second step as it leaves a breadcrumb that may help folks troubleshoot problems.
| monorepoName, | ||
| ) => { | ||
| console.log("Processing action.yml for", name); | ||
| console.log(" Processing action.yml for", 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.
suggestion[nit]: You don't need to do anything for this, just noting it. All these indent shifts indicate to me that we should be using console.group so indentation is handled for us. Or at least tracking indentation level via a variable so spacing is just n * level and things will automatically self-adjust if we increase or decrease the indentation of a parent.
somewhatabstract
left a comment
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.
Meant to check Approve on that last review.
If you add tests, that would be great 😁
Summary:
When I cut the last release, it hit an error during the release. It looks like it was trying to copy a file/dir within
node_modulesto the dist/ folder for a package. This shouldn't be needed as we bundle our JS actions into a singledist/index.jsfile which has no external dependencies.So, I've re-worked the build system a little bit. We copy the
action.yml,package.json(if it exists), and then build theindex.jstodist/index.jsusingncc(if the source file exists).This simplifies our build setup and will clean up what we publish (right now we publish the tags with a bunch of source artifacts that aren't needed).
Issue: XXX-XXXX
Test plan:
I tested by running a publish in a dry-run:
Dry run output
dist/folder contents