-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ensure that npm pack
correctly packages workspaces with exposed executable
#4
Conversation
…cutable, remove lerna for now
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 great, Stalgia! I really appreciate the simplicity and the care you're giving to the process. Let's go ahead with the cross-platform version.
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^20.11.17", | ||
"@types/ws": "^8.5.10", | ||
"@types/yargs": "^17.0.32", | ||
"lerna": "^8.1.3", |
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 incredible what this removal does to the project's dependency tree.
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 know! Lerna can do a whole lot. None of which are needed here yet.
Thanks! Added the node scripts to make the |
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 code looks good to me, and it works for both packages on both platforms. Nice going!
Addresses #3
This PR restructures this repo to accomplish the goals outlined in issue #3:
There were a few issues
package.json
for security reasons. As a previous workaround, I attempted to have a third private repo for the shared code. This causes npm to symlink the files in the workspace dependency to the parent workspace innode_modules
. Unfortunately, these symlinked files are not included in anypack
orpublish
output. As a further workaround, I am using theprepack
step to copy the shared files into the workspaces and thepostpack
to remove any files copied this way.Remaining questions:
shared
files in workspace output uses Unix commands. This prevents publishing on Windows. I can replace these with node scripts or another cross-platform solution if the overall direction is acceptable.