33const path = require ( "path" ) ;
44const compatData = require ( "@mdn/browser-compat-data" ) . javascript ;
55const { process } = require ( "./build-modules-support" ) ;
6- const { generateData, environments, writeFile } = require ( "./utils-build-data" ) ;
6+ const {
7+ generateData,
8+ environments,
9+ writeFile,
10+ defineLegacyPluginAliases,
11+ } = require ( "./utils-build-data" ) ;
712
813for ( const target of [ "plugin" , "corejs2-built-in" ] ) {
914 // We ignore 'overlapping' here, because it's already generated by
1015 // built-bugfixes-targets.js which has a complete view over all the
1116 // plugins that we have data for.
12- const { data : newData } = generateData (
17+ let { data : newData } = generateData (
1318 environments ,
1419 require ( `./data/${ target } -features` )
1520 ) ;
@@ -21,7 +26,11 @@ for (const target of ["plugin", "corejs2-built-in"]) {
2126 // the node.js compat data is 12.0, the first node version ships `export *` behind a flag
2227 // here we overwrite to 13.2 which is the first unflagged version
2328 exportNamespaceFromCompatData . node = "13.2" ;
24- newData [ "proposal-export-namespace-from" ] = exportNamespaceFromCompatData ;
29+ newData [ "transform-export-namespace-from" ] = exportNamespaceFromCompatData ;
30+
31+ // Add proposal-* aliases for backward compatibility.
32+ // TODO(Babel 7): This won't be needed anymore.
33+ newData = defineLegacyPluginAliases ( newData ) ;
2534 }
2635 const dataPath = path . join ( __dirname , `../data/${ target } s.json` ) ;
2736
0 commit comments