You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: drop direct babel dependency + allowing dynamicImport, objectRestSpread (#12)
* update babel version
* update babel in getReplacement, replace and README
* format as json
* use babel object supplied by plugin api for everything but register
* .eslintcache really wants to belong to the codebase
* implement @mlrawlings poc, remove dep for babel/core, /register
* fix typos
* added myself to the contributers
* bump babel plugin macros version again
* pass parserOpts to template fn
* added some test to assure correct behaviour of parserOpts
* pass plugins and presets to child transforms
* trust parent babel to pass the correct parserOpts, including plugins
* codeToAst does not need to be a func anymore
(it screws with test coverage somehow)
* update readme to reflect changes
* fix formatting for md files
BREAKING CHANGE: We are inheriting the babel configurations of the main babel-process, instead of starting a new one. Thus we're not reading the .babelrc.
[![Watch on GitHub][github-watch-badge]][github-watch]
@@ -30,7 +28,9 @@ maintain the exports in my source file. So someone created a post-build script
30
28
to concatenate them to the end of the file. I built this plugin so I could do
31
29
that without having an ad-hoc post-build script.
32
30
33
-
> Read ["Make maintainable workarounds with codegen 💥"](https://blog.kentcdodds.com/make-maintainable-workarounds-with-codegen-d34163a09c13) for more inspiration
31
+
> Read
32
+
> ["Make maintainable workarounds with codegen 💥"](https://blog.kentcdodds.com/make-maintainable-workarounds-with-codegen-d34163a09c13)
33
+
> for more inspiration
34
34
35
35
## This solution
36
36
@@ -49,23 +49,23 @@ and swaps your usage node with the new AST node.
49
49
50
50
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Copy file name to clipboardExpand all lines: src/__tests__/__snapshots__/index.js.snap
+29-1Lines changed: 29 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,7 @@ const x = codegen.require("./fixtures/return-one", "should not be here...")
199
199
200
200
↓ ↓ ↓ ↓ ↓ ↓
201
201
202
-
Error: <PROJECT_ROOT>/src/__tests__/index.js: \`codegen.require\`-ed module (./fixtures/return-one) cannot accept arguments because it does not export a function. You passed the arguments: should not be here...
202
+
Error: <PROJECT_ROOT>/src/__tests__/index.js: codegen module (src/__tests__/fixtures/return-one) cannot accept arguments because it does not export a function. You passed the arguments: should not be here...
0 commit comments