-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
The default export of @actions/artifact@2.0.0 is incorrect #1606
Comments
I'm seeing issues with this too, preventing our builds from completing |
👋 I apologize for the confusion! I think this might be something wrong with the configuration of how our TypeScript config is transpiling the modules. The default export works when using ts. I'll take a look to see how this can be resolved. In the meantime, to avoid any possible breaking import changes, you can import and instanitate the default client (which is what the default export is): import { DefaultArtifactClient } from "@actions/artifact";
const artifactClient = new DefaultArtifactClient(); And you should be good to go 👍 |
I've updated the readme: After talking with the team, we're not looking to turn this into a module yet. So we'll just avoid using default exports for now to avoid confusion between all the different module kinds 👍 |
@robherley Huge thanks for the clarification in the documentation (11a2dd3), just a little suggestion: would you like to beautify the code in these two line: toolkit/packages/artifact/README.md Line 66 in 68f2292
toolkit/packages/artifact/README.md Line 69 in 68f2292
|
Our prettier config does not use bracket spacing unfortunately 😅
Since everything is clarified now, I'll close out the issue. Thanks for your feedback! |
Describe the bug
After upgrading to @actions/artifact@2.0.0, I found out that the default export is incorrect, see the reproduce code below:
To Reproduce
The reproduce code: https://github.com/AnnAngela/AnnAngela/blob/58d95c9ca456e2aa18943eb7e4f25d7a40406173/test.mjs
The output: https://github.com/AnnAngela/AnnAngela/actions/runs/7190162702/job/19582850361#step:5:1
Expected behavior
The below code should work fine:
The text was updated successfully, but these errors were encountered: