Skip to content
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

feat: no lockfiles in tarballs by default #1385

Merged
merged 4 commits into from Apr 25, 2024
Merged

Conversation

mshanemc
Copy link
Member

@mshanemc mshanemc commented Apr 25, 2024

pack:tarballs gets a new --prune-lockfiles flag.

  • If present, tarballs command will remove tarballs (oclif.lock, yarn.lock, npm-shrinkwrap, package-lock) from the local project before creating the tarball.

This is done after addDependencies so that the lockfiles affect that step.

forcedotcom/cli#2835

@@ -9,6 +9,7 @@ Add a pretarball script to your package.json if you need to run any scripts befo

static flags = {
parallel: Flags.boolean({description: 'Build tarballs in parallel.'}),
'preserve-lockfiles': Flags.boolean({description: 'Preserve lockfiles in the tarball.'}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the argument for this being an opt-out flag? As opposed to an opt-in flag like --remove-lockfiles

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default to what most people probably want? That's what we said when we talked.

Could go either way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my preference is to make it an opt-in flag so that we don't risk suddenly breaking other people's builds - even if it's a small risk.

I have a list of of things to do in the next major. If we want, we can switch to an opt-out flag then

}
}

const isLockFile = (f: string) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm-lock.yaml?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, didn't know about that one, will add.

mshanemc and others added 2 commits April 25, 2024 10:54
* fix: compile after install and tests

* test: set git config before cli integration tests

* test: skip pack tests for pnpm
@mdonnalley mdonnalley merged commit 4bfa96f into main Apr 25, 2024
50 of 54 checks passed
@mdonnalley mdonnalley deleted the sm/tarball-lockfiles branch April 25, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants