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

Use latest unzip-stream and unzip.Extract #1724

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
bethanyj28 committed Apr 23, 2024
commit 6e642f628f1636a50841102529403838cde4b6cb
4 changes: 2 additions & 2 deletions packages/artifact/__tests__/download-artifact.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
)

// ensure path traversal was not possible
expect(fs.existsSync(path.join(fixtures.workspaceDir, 'x/etc/hosts'))).toBe(true);
expect(fs.existsSync(path.join(fixtures.workspaceDir, 'y/etc/hosts'))).toBe(true);
expect(fs.existsSync(path.join(fixtures.workspaceDir, 'x/etc/hosts'))).toBe(true)

Check failure on line 226 in packages/artifact/__tests__/download-artifact.test.ts

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest)

Replace `fs.existsSync(path.join(fixtures.workspaceDir,·'x/etc/hosts'))` with `⏎········fs.existsSync(path.join(fixtures.workspaceDir,·'x/etc/hosts'))⏎······`

Check failure on line 226 in packages/artifact/__tests__/download-artifact.test.ts

View workflow job for this annotation

GitHub Actions / Build (macos-latest)

Replace `fs.existsSync(path.join(fixtures.workspaceDir,·'x/etc/hosts'))` with `⏎········fs.existsSync(path.join(fixtures.workspaceDir,·'x/etc/hosts'))⏎······`

Check failure on line 226 in packages/artifact/__tests__/download-artifact.test.ts

View workflow job for this annotation

GitHub Actions / Build (windows-latest)

Replace `fs.existsSync(path.join(fixtures.workspaceDir,·'x/etc/hosts'))` with `␍⏎········fs.existsSync(path.join(fixtures.workspaceDir,·'x/etc/hosts'))␍⏎······`
expect(fs.existsSync(path.join(fixtures.workspaceDir, 'y/etc/hosts'))).toBe(true)

Check failure on line 227 in packages/artifact/__tests__/download-artifact.test.ts

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest)

Replace `fs.existsSync(path.join(fixtures.workspaceDir,·'y/etc/hosts'))` with `⏎········fs.existsSync(path.join(fixtures.workspaceDir,·'y/etc/hosts'))⏎······`

Check failure on line 227 in packages/artifact/__tests__/download-artifact.test.ts

View workflow job for this annotation

GitHub Actions / Build (macos-latest)

Replace `fs.existsSync(path.join(fixtures.workspaceDir,·'y/etc/hosts'))` with `⏎········fs.existsSync(path.join(fixtures.workspaceDir,·'y/etc/hosts'))⏎······`

Check failure on line 227 in packages/artifact/__tests__/download-artifact.test.ts

View workflow job for this annotation

GitHub Actions / Build (windows-latest)

Replace `fs.existsSync(path.join(fixtures.workspaceDir,·'y/etc/hosts'))` with `␍⏎········fs.existsSync(path.join(fixtures.workspaceDir,·'y/etc/hosts'))␍⏎······`

expect(response.downloadPath).toBe(fixtures.workspaceDir)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export async function streamExtractExternal(
reject(error)
})
.pipe(unzip.Extract({path: directory}))
Copy link
Contributor

Choose a reason for hiding this comment

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

Glad we don't have to roll our own implementation anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed! Simplifies this a ton.

.on('close', () => {
.on('close', () => {
clearTimeout(timer)
resolve()
})
Expand Down
Loading