babel icon indicating copy to clipboard operation
babel copied to clipboard

fix: Makefile: crash when no condition

Open coderaiser opened this issue 1 month ago • 3 comments

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

babe-eslint-plugin has no condition, so:

node Makefile.source.mjs new-babel-8-version-create-commit-ci

throws:

file:///Users/coderaiser/babel-babel/Makefile.source.mjs:571
          babel8Condition.peerDependencies["@babel/eslint-parser"] =
                          ^

TypeError: Cannot read properties of undefined (reading 'peerDependencies')
    at file:///Users/coderaiser/babel-babel/Makefile.source.mjs:571:27
    at Array.forEach (<anonymous>)
    at file:///Users/coderaiser/babel-babel/Makefile.source.mjs:559:25
    at Array.forEach (<anonymous>)
    at bumpVersionsToBabel8Pre (file:///Users/coderaiser/babel-babel/Makefile.source.mjs:558:11)
    at target.new-babel-8-version-create-commit-ci (file:///Users/coderaiser/babel-babel/Makefile.source.mjs:587:23)
    at global.target.<computed> [as new-babel-8-version-create-commit-ci] (/Users/coderaiser/babel-babel/node_modules/shelljs/make.js:36:40)
    at /Users/coderaiser/babel-babel/node_modules/shelljs/make.js:48:27
    at Array.forEach (<anonymous>)
    at Timeout._onTimeout (/Users/coderaiser/babel-babel/node_modules/shelljs/make.js:46:10)

Node.js v25.2.1

coderaiser avatar Dec 05 '25 18:12 coderaiser

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/60396

babel-bot avatar Dec 05 '25 18:12 babel-bot

We are in the process of removing Babel 7 from the codebase, I still need to recheck the whole publishing process.

nicolo-ribaudo avatar Dec 05 '25 19:12 nicolo-ribaudo