feat(pkg): optimize attw and publint packing#736
Merged
Conversation
- Add @publint/pack to deps and package-manager-detector for smart pack detection - Create tarball once and share buffer between publint and attw - Remove duplicate npm pack logic from attw, use createPackageFromTarballData - Detect package manager to optimize packing for npm, yarn, pnpm, bun
- Use @publint/pack instead of npm pack for consistent packing across package managers - Detect package manager with package-manager-detector and pass to pack - Pack tarball once when both publint and attw are enabled, share buffer between them - Simplify attw implementation by removing temporary npm pack logic - Update publint to accept pre-packed tarball instead of pkgDir Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
❌ Deploy Preview for tsdown failed.
|
If packTarball throws, ctx.resolve() must still run so other bundles awaiting ctx.promise don't hang indefinitely.
Error is now caught by the outer try/catch in bundleDone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Use
@publint/packinstead of hardcodednpm packto pack tarballs for attw and publint checks. When both features are enabled, the tarball is packed only once and shared between them.@publint/packandpackage-manager-detectoras inlined dev dependenciespackage-manager-detectorand pass it to@publint/packnpm packlogic; accept pre-packed tarball insteadpack: { tarball }optionLinked Issues
Closes #733
Additional context
This removes the hard dependency on
npmCLI for packing and ensures both linters work with an identical tarball.