You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there, it looks like you're trying to import the danger module. Turns out
that the code you write in a Dangerfile.js is actually a bit of a sneaky hack.
When running Danger, the import or require for Danger is removed before the code
is evaluated. Instead all of the imports are added to the global runtime, so if
you are importing Danger to use one of it's functions - you should instead just
use the global object for the root DSL elements.
There is a spectrum thread for discussion here:
- https://spectrum.chat/?t=0a005b56-31ec-4919-9a28-ced623949d4d
That spectrum link doesn't exist anymore.
To Reproduce
Steps to reproduce the behavior:
Add this line in a danger.ts: import { danger } from 'danger';
Run Danger
Expected behavior
Get a warning with a non-dead link, or amend the warning message so the link isn't needed.
Screenshots
If applicable, add screenshots to help explain your problem.
Your Environment
software
version
danger.js
12.3.3
node
18.20.4
npm
10.7.0
Operating System
MacOS
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I thought about trying to reword it all to embed it in the plain text of the thrown exception, but I think the link to the GitHub discussion is more effective/practical for now.
Describe the bug
When I use an import statement like this:
I get the warning message described here https://github.com/danger/danger-js/blob/491bb0b401148366cbe0e4d2bc9705fea521a647/source/danger.ts#L13C5-L13C66
That spectrum link doesn't exist anymore.
To Reproduce
Steps to reproduce the behavior:
danger.ts
:import { danger } from 'danger';
Expected behavior
Get a warning with a non-dead link, or amend the warning message so the link isn't needed.
Screenshots
If applicable, add screenshots to help explain your problem.
Your Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: