Skip to content

upgrade to tar v7#32471

Merged
freben merged 1 commit intomasterfrom
freben/tar
Jan 22, 2026
Merged

upgrade to tar v7#32471
freben merged 1 commit intomasterfrom
freben/tar

Conversation

@freben
Copy link
Copy Markdown
Member

@freben freben commented Jan 22, 2026

No description provided.

@freben freben requested review from a team and backstage-service as code owners January 22, 2026 11:32
@github-actions github-actions Bot added the area:scaffolder Everything and all things related to the scaffolder project area label Jan 22, 2026
@backstage-goalie
Copy link
Copy Markdown
Contributor

backstage-goalie Bot commented Jan 22, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/backend-defaults packages/backend-defaults patch v0.15.0
@backstage/cli packages/cli patch v0.35.2
@backstage/repo-tools packages/repo-tools patch v0.16.2
@backstage/plugin-scaffolder-backend plugins/scaffolder-backend patch v3.1.1
@backstage/plugin-scaffolder-node plugins/scaffolder-node patch v0.12.3

portable: true,
noMtime: true,
gzip: true,
} as CreateOptions & { noMtime: boolean },
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Biggest v7 improvement is that it has native typescript support. It seems that the types indeed match our intent here - if you try to change the noMtime parameter to something invalid it does complain etc.

@freben freben requested a review from a team as a code owner January 22, 2026 11:53
@freben freben changed the title fix some of the easy tar upgrades upgrade to tar v7 Jan 22, 2026
Signed-off-by: Fredrik Adelöw <freben@gmail.com>

// Block symlinks/hardlinks that escape the extraction directory
const entry = stat as FileStat & { type?: string; linkpath?: string };
const entry = stat as ReadEntry;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this even need a cast now?

Copy link
Copy Markdown
Member Author

@freben freben Jan 22, 2026

Choose a reason for hiding this comment

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

Yeah it's a bit unfortunate of an interface - the doc comment for filter says

    /**
     * A function that is called with `(path, stat)` when creating an archive, or
     * `(path, entry)` when extracting. Return true to process the file/entry, or
     * false to exclude it.
     */
    filter?: (path: string, entry: Stats | ReadEntry) => boolean;

and in this context we are extracting - we do need to cast.

@freben freben merged commit ecdd302 into master Jan 22, 2026
31 checks passed
@freben freben deleted the freben/tar branch January 22, 2026 13:52
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.48.0 release, scheduled for Tue, 17 Feb 2026.

jonkoops pushed a commit to jonkoops/backstage that referenced this pull request Apr 13, 2026
jonkoops pushed a commit to jonkoops/backstage that referenced this pull request Apr 14, 2026
jonkoops pushed a commit to jonkoops/backstage that referenced this pull request Apr 14, 2026
jonkoops pushed a commit to jonkoops/backstage that referenced this pull request Apr 14, 2026
jonkoops pushed a commit to jonkoops/backstage that referenced this pull request Apr 14, 2026
jonkoops pushed a commit to jonkoops/backstage that referenced this pull request Apr 14, 2026
jonkoops pushed a commit to jonkoops/backstage that referenced this pull request Apr 14, 2026
upgrade to `tar` v7

Signed-off-by: Jon Koops <jonkoops@gmail.com>
jonkoops added a commit to jonkoops/rhdh that referenced this pull request Apr 20, 2026
Upgrades @backstage/backend-defaults (0.13.2 -> 0.13.3) and
@backstage/plugin-scaffolder-backend (3.0.2 -> 3.0.3) to replace
the deprecated tar v6 with tar v7.

Backports backstage/backstage#32471 via backstage/backstage#33904.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:scaffolder Everything and all things related to the scaffolder project area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants