danger / danger-js

⚠️ Stop saying "you forgot to …" in code review
http://danger.systems/js/
MIT License
5.22k stars 363 forks source link

[BUG] 12.3.2 requires changes to TS dangerfiles #1457

Closed cjpearson closed 1 month ago

cjpearson commented 1 month ago

Describe the bug

When updating to 12.3.2 the danger job fails with the error SyntaxError: Cannot use import statement outside a module. Renaming the file to .mts does not fix the issue.

To Reproduce Steps to reproduce the behavior:

  1. Create a dangerfile.ts
  2. Use the import { x, y, z } from './scripts/utils' syntax in the file
  3. Upgrade to 12.3.2

Expected behavior

12.6.2 should continue to work with existing dangerfiles.

Your Environment

software version
danger.js 12.3.2
node 20.13.1
npm yarnv1
Operating System alpine linux 3.18
matthewh commented 1 month ago

Fixed by https://github.com/danger/danger-js/pull/1456

orta commented 1 month ago

Deploy of this fix has just started

cjpearson commented 1 month ago

12.3.3 works. Thanks for the quick fix!