@teambit/babel 1.0.281 → 1.0.283
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_compilation_babel-preview.js +1 -1
- package/artifacts/schema.json +1 -1
- package/dist/babel.composition.js +1 -1
- package/dist/babel.composition.js.map +1 -1
- package/dist/babel.main.runtime.js +1 -1
- package/dist/babel.main.runtime.js.map +1 -1
- package/dist/{preview-1716434516635.js → preview-1716607230882.js} +2 -2
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.compilation/babel@1.0.
|
|
3
|
+
<testsuite name="teambit.compilation/babel@1.0.283" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.compilation/babel-preview"]=t():e["teambit.compilation/babel-preview"]=t()}(self,(()=>(()=>{"use strict";var e={74204:(e,t,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.compilation/babel-preview"]=t():e["teambit.compilation/babel-preview"]=t()}(self,(()=>(()=>{"use strict";var e={74204:(e,t,n)=>{var o={id:"teambit.compilation/aspect-docs/babel@0.0.169",homepage:"https://bit.cloud/teambit/compilation/aspect-docs/babel",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=d,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},p.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,o,r=s(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function s(e,t){if(null==e)return{};var n={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}a.__bit_component=o,p.__bit_component=o,l.__bit_component=o,s.__bit_component=o;var c={},m="wrapper";function d(e){var t=e.components,n=l(e,i);return(0,r.mdx)(m,p({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"This compiler utilizes the programmatic API of Babel to transpile files. See the compiler-options.ts for more data how to pass Babel options to the compiler."),(0,r.mdx)("p",null,"Note that to isolate the components from different Babel config files on the machine, the following two props are set to false (if they weren't passed in the options): ",(0,r.mdx)("inlineCode",{parentName:"p"},"configFile")," and ",(0,r.mdx)("inlineCode",{parentName:"p"},"babelrc"),"."),(0,r.mdx)("h2",null,"FAQ"),(0,r.mdx)("p",null,(0,r.mdx)("em",{parentName:"p"},"Q"),": I'm getting an error about missing plugins."),(0,r.mdx)("p",null,(0,r.mdx)("em",{parentName:"p"},"A"),": make sure that workspace.jsonc has the plugins and that you ran ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit install"),".\nExample of the workspace.jsonc settings:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},'"my-babel-env": {\n "teambit.bit/aspect": {},\n "teambit.bit/dependency-resolver": {\n "policy": {\n "dependencies": {\n "@babel/core": "7.11.6",\n "@babel/preset-react": "7.22.15",\n "@babel/preset-env": "7.22.15",\n "@babel/preset-typescript": "7.22.15",\n "@babel/plugin-transform-class-properties": "7.22.5"\n }\n }\n }\n },\n')),(0,r.mdx)("ol",{start:2},(0,r.mdx)("li",{parentName:"ol"},"You're not using the plugin.\nThe reason for the error is that Babel searches for config files in different directories. To disable this, add the following to the config you pass to the compiler:")),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},'{\n ...\n "babelrc": false,\n "configFile": false,\n}\n')),(0,r.mdx)("p",null,"this takes care of both .babelrc and babel.config.json."))}d.__bit_component=o,d.isMDXComponent=!0},29017:(e,t,n)=>{Object.defineProperty(t,"n",{enumerable:!0,get:function(){return o.default}});var o=r(n(74204));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.compilation/aspect-docs/babel@0.0.169",homepage:"https://bit.cloud/teambit/compilation/aspect-docs/babel",exported:!0}},10354:(e,t,n)=>{var o={id:"teambit.compilation/babel@1.0.283",homepage:"https://bit.cloud/teambit/compilation/babel",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/babel.svg"}));a.__bit_component=o,t.Logo=a},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{compositions:()=>d,compositions_metadata:()=>u,overview:()=>b});var e={};n.r(e),n.d(e,{default:()=>m});var t=n(10354),r=(n(41594),n(5016));const i=TeambitMdxUiMdxScopeContext;var a=n(29017),p=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l.apply(null,arguments)}var s={},c="wrapper";function m(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,p);return(0,r.mdx)(c,l({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{Babel:a.n},mdxType:"MDXScopeProvider"},(0,r.mdx)(a.n,{mdxType:"Babel"})))}m.isMDXComponent=!0;const d=[t],b=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),o})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -11,7 +11,7 @@ function _react() {
|
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
|
-
function _interopRequireDefault(
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
|
16
16
|
style: {
|
|
17
17
|
height: '100%',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","e","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["babel.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/babel.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAmD,CAAE,CACjF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -48,7 +48,7 @@ function _babel() {
|
|
|
48
48
|
}
|
|
49
49
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
50
50
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
51
|
-
function _defineProperty(
|
|
51
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
52
52
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
53
53
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
54
54
|
class BabelMain {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_compiler","_logger","_compilation","babel","_interopRequireWildcard","_babel","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_defineProperty","
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_compiler","_logger","_compilation","babel","_interopRequireWildcard","_babel","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","BabelMain","constructor","logger","compiler","createCompiler","options","babelModule","BabelCompiler","BabelAspect","id","babelTransformOptions","getPackageJsonProps","main","provider","loggerExt","createLogger","exports","MainRuntime","LoggerAspect","CompilerAspect","addRuntime"],"sources":["babel.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { BabelCompiler } from '@teambit/compilation.babel-compiler';\nimport * as babel from '@babel/core';\nimport { BabelCompilerOptions } from './compiler-options';\nimport { BabelAspect } from './babel.aspect';\n\nexport class BabelMain {\n constructor(private logger: Logger, private compiler: CompilerMain) {}\n\n createCompiler(options: BabelCompilerOptions, babelModule = babel): BabelCompiler {\n return new BabelCompiler(BabelAspect.id, this.logger, options, options.babelTransformOptions || {}, babelModule);\n }\n\n getPackageJsonProps() {\n return {\n main: 'dist/{main}.js',\n };\n }\n\n static runtime = MainRuntime;\n static dependencies = [LoggerAspect, CompilerAspect];\n\n static async provider([loggerExt, compiler]: [LoggerMain, CompilerMain]) {\n const logger = loggerExt.createLogger(BabelAspect.id);\n return new BabelMain(logger, compiler);\n }\n}\n\nBabelAspect.addRuntime(BabelMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,MAAA;EAAA,MAAAL,IAAA,GAAAM,uBAAA,CAAAL,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,OAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,MAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6C,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAA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EC,0BAAc,CAAC;AAQtDX,oBAAW,CAACY,UAAU,CAACpB,SAAS,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_babel@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_babel@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_babel@1.0.283/dist/babel.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_babel@1.0.283/dist/babel.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/babel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.283",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/compilation/babel",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.compilation",
|
|
8
8
|
"name": "babel",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.283"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/core": "7.19.6",
|
|
13
13
|
"@teambit/harmony": "0.4.6",
|
|
14
14
|
"@teambit/compilation.babel-compiler": "1.1.8",
|
|
15
15
|
"@teambit/cli": "0.0.865",
|
|
16
|
-
"@teambit/compiler": "1.0.
|
|
16
|
+
"@teambit/compiler": "1.0.283",
|
|
17
17
|
"@teambit/logger": "0.0.958"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|