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
I am having some trouble getting Peril set up for our org. It seems to be getting stuck on the default export, and I don't know why.
Note: I noticed the caveat in the setup doc about the mono repo not being ready so I am using peril at 0db941d on Heroku.
The peril settings repo is here. The rules use the default export like this:
import {warn, fail, danger} from "danger";
export default async () => {
....
// Warn if the PR doesn't have a milestone
const issue = await danger.github.api.issues.get(danger.github.thisPR);
if (issue.data.milestone == null) {
warn("PR is not assigned to a milestone.");
}
...
};
For some reason that I can't seem to figure out I am receiving this error from Peril:
Unexpected token export
/app/danger-0.w2es6eqarz8.js:5
export default async () => {
^^^^^^
SyntaxError: Unexpected token export
at new Script (vm.js:79:7)
at VMScript.compile (/app/node_modules/vm2/lib/main.js:78:20)
at NodeVM.run (/app/node_modules/vm2/lib/main.js:414:27)
at Object.<anonymous> (/app/node_modules/danger/distribution/runner/runners/vm2.js:115:37)
at step (/app/node_modules/danger/distribution/runner/runners/vm2.js:43:23)
at Object.next (/app/node_modules/danger/distribution/runner/runners/vm2.js:24:53)
at /app/node_modules/danger/distribution/runner/runners/vm2.js:18:71
at new Promise (<anonymous>)
at __awaiter (/app/node_modules/danger/distribution/runner/runners/vm2.js:14:12)
at Object.exports.runDangerfileEnvironment (/app/node_modules/danger/distribution/runner/runners/vm2.js:95:121)
at runDangerAgainstFileInline (/app/out/danger/danger_runner.js:49:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
I also get the same error when running yarn danger pr https://github.com/wordpress-mobile/WordPress-iOS/pull/10931 in the repo itself.
Am I missing something obvious or is this a bug somewhere?
The text was updated successfully, but these errors were encountered:
Once #417 is working reliably I'll try do a run on getting babel etc up and running, for now you can probably just rename the JS files to TS and I'd expect it shouldwork
I am having some trouble getting Peril set up for our org. It seems to be getting stuck on the default export, and I don't know why.
Note: I noticed the caveat in the setup doc about the mono repo not being ready so I am using peril at 0db941d on Heroku.
The peril settings repo is here. The rules use the default export like this:
You can see the full file here.
For some reason that I can't seem to figure out I am receiving this error from Peril:
I also get the same error when running
yarn danger pr https://github.com/wordpress-mobile/WordPress-iOS/pull/10931
in the repo itself.Am I missing something obvious or is this a bug somewhere?
The text was updated successfully, but these errors were encountered: