* Download artifact: don't extract the downloaded file if the content-type isn't a zip
* Remove unused `import`
* Add support for specifying whether to skip decompressing
* Prevent path traversal attacks
* Fix indenting
* Update packages/artifact/__tests__/download-artifact.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Parse the mime type out of the content-type header
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix some linting issues
* Swap `zip` for `application/zip-compressed`
* Test: negative check for malicious paths
* Increase the timeout on one of the tests
* Check the URL path for `.zip` to see if we can auto-decompress
* Fix linting issue
* Bump the package version and add release notes
* Remove `launch.json`
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* `@actions/artifact`: convert to an ESM module
* Update the package-lock.json
* Undo the GHES ignores
* Fix the reference to `@actions/http-client` in the lock file
* Bump `@actions/core` to `3.0.0`
* Remove `jest.config.cjs`
* Import `OctoKitOptions` from `@octokit/core/types`
* Pull the package version from `package.json`
* Workaround getting the package version for the user-agent
* Fix the `archiver` import
* Fix linting
We moved `@actions/http-client` to be part of the toolkit in https://github.com/actions/toolkit/pull/1062. We also made some breaking changes to exported types and released v2.
The biggest change in terms of lines of code affected was to get rid of the `I-` prefix for interfaces since TypeScript doesn't follow this convention.
I bumped the patch version of all packages except for `tool-cache`, where I bumped the major version. The rationale is explained in the release notes for that package.
* Retry all http calls for artifact upload and download
* Extra debug information
* Fix lint
* Always read response body
* PR Feedback
* Change error message if patch call fails
* Add exponential backoff when retrying
* Rework tests and add diagnostic info if exception thrown
* Fix lint
* fix lint error for real this time
* PR cleanup
* 0.5.0 @actions/artifact release
* Display diagnostic info if non-retryable code is hit