Re: [Pkg-javascript-devel] babel 7 bootstrap problem and reify
On ചൊ, Jan 21, 2020 at 14:40, Pirate Praveen wrote: On ചൊ, Jan 21, 2020 at 14:28, Pirate Praveen wrote: On ചൊ, Jan 21, 2020 at 13:20, Pirate Praveen wrote: On തി, Jan 20, 2020 at 21:45, Pirate Praveen wrote: Hi, Just came across this module today https://github.com/benjamn/reify I was wondering if we could use this module to load ES6 files of babel directly (as we are stuck trying to build babel 7 and it needs babel 7 to build). Comments? Praveen With the following lines in .babelrc, some packages/* can be build with babeljs 6. { "presets": [ "env", "flow" ], "plugins": [ [ "transform-object-rest-spread", ] ], } babeljs packages/babel-plugin-proposal-class-properties/src -d packages/babel-plugin-proposal-class-properties/lib packages/babel-plugin-proposal-class-properties/src/index.js -> packages/babel-plugin-proposal-class-properties/lib/index.js But some packages are using babel 7 only plugins. For example, building babel-core fails with this error. Anyone knows which plugin is used here? babeljs packages/babel-core/src/ -d packages/babel-core/lib SyntaxError: packages/babel-core/src/config/caching.js: Unexpected token (49:56) 47 | handler: (ArgT, CacheConfigurator) => Handler | ResultT, 48 | ): (ArgT, SideChannel) => Handler { > 49 | return makeCachedFunction*>(WeakMap, handler); | ^ 50 | } 51 | 52 | export function makeWeakCacheSync( Jishnu identified it as flow syntax and probably we can get rid of it with an updated version of https://www.npmjs.com/package/flow-remove-types And this requires packaging flow-parser which is written in OCaml. Anyone here familar with OCaml? Any comments if this route is worth pursuing? Even with the updated flow-remove-types, we are only half way. It requires babel 7 versions of many plugins like class-properties (babel 6 versions don't work). So I think the only way to update it is via contrib, ie, use babel 7 from npmjs.com to bootstrap (since build dependency is not in debian, it has to go to contrib). Once we have a babel 7 package, it can build itself. -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] babel 7 bootstrap problem and reify
On ചൊ, Jan 21, 2020 at 14:28, Pirate Praveen wrote: On ചൊ, Jan 21, 2020 at 13:20, Pirate Praveen wrote: On തി, Jan 20, 2020 at 21:45, Pirate Praveen wrote: Hi, Just came across this module today https://github.com/benjamn/reify I was wondering if we could use this module to load ES6 files of babel directly (as we are stuck trying to build babel 7 and it needs babel 7 to build). Comments? Praveen With the following lines in .babelrc, some packages/* can be build with babeljs 6. { "presets": [ "env", "flow" ], "plugins": [ [ "transform-object-rest-spread", ] ], } babeljs packages/babel-plugin-proposal-class-properties/src -d packages/babel-plugin-proposal-class-properties/lib packages/babel-plugin-proposal-class-properties/src/index.js -> packages/babel-plugin-proposal-class-properties/lib/index.js But some packages are using babel 7 only plugins. For example, building babel-core fails with this error. Anyone knows which plugin is used here? babeljs packages/babel-core/src/ -d packages/babel-core/lib SyntaxError: packages/babel-core/src/config/caching.js: Unexpected token (49:56) 47 | handler: (ArgT, CacheConfigurator) => Handler | ResultT, 48 | ): (ArgT, SideChannel) => Handler { > 49 | return makeCachedFunction*>(WeakMap, handler); | ^ 50 | } 51 | 52 | export function makeWeakCacheSync( Jishnu identified it as flow syntax and probably we can get rid of it with an updated version of https://www.npmjs.com/package/flow-remove-types And this requires packaging flow-parser which is written in OCaml. Anyone here familar with OCaml? Any comments if this route is worth pursuing? -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] babel 7 bootstrap problem and reify
On ചൊ, Jan 21, 2020 at 13:20, Pirate Praveen wrote: On തി, Jan 20, 2020 at 21:45, Pirate Praveen wrote: Hi, Just came across this module today https://github.com/benjamn/reify I was wondering if we could use this module to load ES6 files of babel directly (as we are stuck trying to build babel 7 and it needs babel 7 to build). Comments? Praveen With the following lines in .babelrc, some packages/* can be build with babeljs 6. { "presets": [ "env", "flow" ], "plugins": [ [ "transform-object-rest-spread", ] ], } babeljs packages/babel-plugin-proposal-class-properties/src -d packages/babel-plugin-proposal-class-properties/lib packages/babel-plugin-proposal-class-properties/src/index.js -> packages/babel-plugin-proposal-class-properties/lib/index.js But some packages are using babel 7 only plugins. For example, building babel-core fails with this error. Anyone knows which plugin is used here? babeljs packages/babel-core/src/ -d packages/babel-core/lib SyntaxError: packages/babel-core/src/config/caching.js: Unexpected token (49:56) 47 | handler: (ArgT, CacheConfigurator) => Handler | ResultT, 48 | ): (ArgT, SideChannel) => Handler { > 49 | return makeCachedFunction*>(WeakMap, handler); | ^ 50 | } 51 | 52 | export function makeWeakCacheSync( Jishnu identified it as flow syntax and probably we can get rid of it with an updated version of https://www.npmjs.com/package/flow-remove-types -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] babel 7 bootstrap problem and reify
On തി, Jan 20, 2020 at 21:45, Pirate Praveen wrote: Hi, Just came across this module today https://github.com/benjamn/reify I was wondering if we could use this module to load ES6 files of babel directly (as we are stuck trying to build babel 7 and it needs babel 7 to build). Comments? Praveen With the following lines in .babelrc, some packages/* can be build with babeljs 6. { "presets": [ "env", "flow" ], "plugins": [ [ "transform-object-rest-spread", ] ], } babeljs packages/babel-plugin-proposal-class-properties/src -d packages/babel-plugin-proposal-class-properties/lib packages/babel-plugin-proposal-class-properties/src/index.js -> packages/babel-plugin-proposal-class-properties/lib/index.js But some packages are using babel 7 only plugins. For example, building babel-core fails with this error. Anyone knows which plugin is used here? babeljs packages/babel-core/src/ -d packages/babel-core/lib SyntaxError: packages/babel-core/src/config/caching.js: Unexpected token (49:56) 47 | handler: (ArgT, CacheConfigurator) => Handler | ResultT, 48 | ): (ArgT, SideChannel) => Handler { > 49 | return makeCachedFunction*>(WeakMap, handler); | ^ 50 | } 51 | 52 | export function makeWeakCacheSync( -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
[Pkg-javascript-devel] babel 7 bootstrap problem and reify
Hi, Just came across this module today https://github.com/benjamn/reify I was wondering if we could use this module to load ES6 files of babel directly (as we are stuck trying to build babel 7 and it needs babel 7 to build). Comments? Praveen -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel