Skip to content

Commit

Permalink
Update devdependecies tar and type (#66580)
Browse files Browse the repository at this point in the history
Update devdependecies tar and type.

I have only imported the necessary function, maybe it is a little
unverbose, we can use instead of ‘x’ => ‘extract’.

---------

Co-authored-by: torresgol10.itd <[email protected]>
Co-authored-by: Sam Ko <[email protected]>
  • Loading branch information
3 people authored Jun 10, 2024
1 parent 4539e33 commit 1afdbb8
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 20 deletions.
6 changes: 3 additions & 3 deletions packages/create-next-app/helpers/examples.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/no-extraneous-dependencies */
import tar from 'tar'
import { x } from 'tar'
import { Readable } from 'stream'
import { pipeline } from 'stream/promises'

Expand Down Expand Up @@ -103,7 +103,7 @@ export async function downloadAndExtractRepo(
await downloadTarStream(
`https://codeload.github.com/${username}/${name}/tar.gz/${branch}`
),
tar.x({
x({
cwd: root,
strip: filePath ? filePath.split('/').length + 1 : 1,
filter: (p) =>
Expand All @@ -125,7 +125,7 @@ export async function downloadAndExtractExample(root: string, name: string) {
await downloadTarStream(
'https://codeload.github.com/vercel/next.js/tar.gz/canary'
),
tar.x({
x({
cwd: root,
strip: 2 + name.split('/').length,
filter: (p) => p.includes(`next.js-canary/examples/${name}/`),
Expand Down
4 changes: 2 additions & 2 deletions packages/create-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@types/cross-spawn": "6.0.0",
"@types/node": "^20.12.3",
"@types/prompts": "2.4.2",
"@types/tar": "6.1.5",
"@types/tar": "6.1.13",
"@types/validate-npm-package-name": "4.0.2",
"@vercel/ncc": "0.34.0",
"async-retry": "1.3.1",
Expand All @@ -46,7 +46,7 @@
"picocolors": "1.0.0",
"prettier-plugin-tailwindcss": "0.3.0",
"prompts": "2.4.2",
"tar": "6.1.15",
"tar": "7.2.0",
"update-check": "1.5.4",
"validate-npm-package-name": "5.0.1"
},
Expand Down
82 changes: 67 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1afdbb8

Please sign in to comment.