Skip to content

lookup: skip coffeescript - #1081

Merged
targos merged 1 commit into
nodejs:mainfrom
targos:skip-coffee
Dec 23, 2024
Merged

targos merged 1 commit into
nodejs:mainfrom
targos:skip-coffee

Conversation

@targos

@targos targos commented Dec 21, 2024 •

Copy link
Copy Markdown
Member

No description provided.

@RafaelGSS

Copy link
Copy Markdown
Member

cc: @jashkenas @GeoffreyBooth

@GeoffreyBooth

Copy link
Copy Markdown
Member

So the referenced PR, jashkenas/coffeescript#5478, disables some import assertion tests and some error stack trace tests. I think the former should be fixed by changing assert to with; but the latter might be a real issue. I don’t know why --enable-source-maps would have worked previously for CoffeeScript but be broken now.

@targos

targos commented Dec 23, 2024

Copy link
Copy Markdown
Member Author

In any case, this has to be fixed in the coffeescript package. In the mean time, we skip it to reduce the noise for releasers.

@targos
targos merged commit 463f500 into nodejs:main Dec 23, 2024
@targos
targos deleted the skip-coffee branch December 23, 2024 08:39
@GeoffreyBooth

Copy link
Copy Markdown
Member

I'm saying that the source maps one is possibly a bug in Node. Nothing changed on the CoffeeScript side.

@abhayagarwal-dev

abhayagarwal-dev commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Hi @targos @GeoffreyBooth,

I investigated the test failures under Node 22+ and verified a fix that passes cleanly in CITGM:

Cause

  1. Import Assertions (assert vs with): Modern Node versions deprecated/removed assert: { type: 'json' } syntax in dynamic imports. Updating tests to standard import attributes (with: { type: 'json' }) resolves this.
  2. Error.prepareStackTrace in Node 22+: Node 22+ now sets its own internal Error.prepareStackTrace (ErrorPrepareStackTrace) by default. CoffeeScript was checking unless Error.prepareStackTrace before attaching its source-map patch, which caused it to skip installing the handler. Additionally, test/sourcemap.coffee asserted Error.prepareStackTrace === undefined rather than verifying it remained unchanged.

Verification

I opened a fix on CoffeeScript PR 5503 and verified it against CITGM on Node 22.x:

info: starting            | coffeescript        
info: lookup              | coffeescript        
info: lookup-found        | coffeescript        
info: coffeescript lookup-replace| https://github.com/abhayagarwal-dev/coffeescript/archive/fix/node22-compat.tar.gz
info: coffeescript npm:   | Downloading project: https://github.com/abhayagarwal-dev/coffeescript/archive/fix/node22-compat.tar.gz
info: coffeescript npm:   | Project downloaded node22-compat.tar.gz
info: coffeescript npm:   | npm install started 
info: coffeescript npm:   | npm install successfully completed
info: coffeescript npm:   | test suite started  
info: passing module(s)   |                     
info: module name:        | coffeescript        
info: version:            | 2.7.0               
info: done                | The smoke test has passed.
info: duration            | test duration: 9433ms

Also verified using coffeescript's npm test

$npm test

coffeescript@2.7.0 test
node ./bin/cake test

Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
passed 1473 tests in 8.33 seconds 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants