We have been encountering Trace warnings stating that the node type RestProperty has been renamed to RestElement in our builds. Although the build is successful, we are seeing a lot of these warnings since upgrading to babel 7.0.0
I attempted the solution provided here Trace: The node type SpreadProperty has been renamed to SpreadElement at Object.isSpreadProperty but unfortunately, it did not resolve the issue.
relevant package.json:
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.0.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@babel/polyfill": "7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
...
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.0",
babelrc:
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-syntax-dynamic-import",
["@babel/plugin-proposal-class-properties", { "loose": false }],
],
"env": {
"test": {
"plugins": ["transform-es2015-modules-commonjs", "transform-regenerator"]
}
}
}
Trace: The node type RestProperty has been renamed to RestElement
at Object.isRestProperty (/apps/node_modules/@babel/types/lib/validators/generated/index.js:4192:11)
at DestructuringTransformer.pushObjectPattern (/apps/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:197:15)
at DestructuringTransformer.push (/apps/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:108:14)
at DestructuringTransformer.init (/apps/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:317:12)
at PluginPass.VariableDeclaration (/apps/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js:468:27)
...
// Additional stack trace lines could be added as per requirement