@teambit/babel 1.0.183 → 1.0.185

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.
@@ -1,8 +1,8 @@
1
1
  import { CompilerMain } from '@teambit/compiler';
2
2
  import { Logger, LoggerMain } from '@teambit/logger';
3
+ import { BabelCompiler } from '@teambit/compilation.babel-compiler';
3
4
  import * as babel from '@babel/core';
4
5
  import { BabelCompilerOptions } from './compiler-options';
5
- import { BabelCompiler } from './babel.compiler';
6
6
  export declare class BabelMain {
7
7
  private logger;
8
8
  private compiler;
@@ -25,6 +25,13 @@ function _logger() {
25
25
  };
26
26
  return data;
27
27
  }
28
+ function _compilation() {
29
+ const data = require("@teambit/compilation.babel-compiler");
30
+ _compilation = function () {
31
+ return data;
32
+ };
33
+ return data;
34
+ }
28
35
  function babel() {
29
36
  const data = _interopRequireWildcard(require("@babel/core"));
30
37
  babel = function () {
@@ -39,13 +46,6 @@ function _babel() {
39
46
  };
40
47
  return data;
41
48
  }
42
- function _babel2() {
43
- const data = require("./babel.compiler");
44
- _babel2 = function () {
45
- return data;
46
- };
47
- return data;
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 && Object.prototype.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
51
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -57,7 +57,7 @@ class BabelMain {
57
57
  this.compiler = compiler;
58
58
  }
59
59
  createCompiler(options, babelModule = babel()) {
60
- return new (_babel2().BabelCompiler)(_babel().BabelAspect.id, this.logger, this.compiler, options, babelModule);
60
+ return new (_compilation().BabelCompiler)(_babel().BabelAspect.id, this.logger, options, options.babelTransformOptions || {}, babelModule);
61
61
  }
62
62
  getPackageJsonProps() {
63
63
  return {
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_compiler","_logger","babel","_interopRequireWildcard","_babel","_babel2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_defineProperty","obj","key","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","BabelMain","constructor","logger","compiler","createCompiler","options","babelModule","BabelCompiler","BabelAspect","id","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 * as babel from '@babel/core';\nimport { BabelCompilerOptions } from './compiler-options';\nimport { BabelAspect } from './babel.aspect';\nimport { BabelCompiler } from './babel.compiler';\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, this.compiler, options, 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(B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,CAAA,MAAAH,CAAA,GAAAG,CAAA,CAAA2B,MAAA,CAAAC,WAAA,kBAAA/B,CAAA,QAAAkB,CAAA,GAAAlB,CAAA,CAAAiB,IAAA,CAAAd,CAAA,EAAAD,CAAA,uCAAAgB,CAAA,SAAAA,CAAA,YAAAc,SAAA,yEAAA9B,CAAA,GAAA2B,MAAA,GAAAI,MAAA,EAAA9B,CAAA;AAE1C,MAAM+B,SAAS,CAAC;EACrBC,WAAWA,CAASC,MAAc,EAAUC,QAAsB,EAAE;IAAA,KAAhDD,MAAc,GAAdA,MAAc;IAAA,KAAUC,QAAsB,GAAtBA,QAAsB;EAAG;EAErEC,cAAcA,CAACC,OAA6B,EAAEC,WAAW,GAAG7C,KAAK,CAAD,CAAC,EAAiB;IAChF,OAAO,KAAI8C,uBAAa,EAACC,oBAAW,CAACC,EAAE,EAAE,IAAI,CAACP,MAAM,EAAE,IAAI,CAACC,QAAQ,EAAEE,OAAO,EAAEC,WAAW,CAAC;EAC5F;EAEAI,mBAAmBA,CAAA,EAAG;IACpB,OAAO;MACLC,IAAI,EAAE;IACR,CAAC;EACH;EAKA,aAAaC,QAAQA,CAAC,CAACC,SAAS,EAAEV,QAAQ,CAA6B,EAAE;IACvE,MAAMD,MAAM,GAAGW,SAAS,CAACC,YAAY,CAACN,oBAAW,CAACC,EAAE,CAAC;IACrD,OAAO,IAAIT,SAAS,CAACE,MAAM,EAAEC,QAAQ,CAAC;EACxC;AACF;AAACY,OAAA,CAAAf,SAAA,GAAAA,SAAA;AAAAd,eAAA,CApBYc,SAAS,aAaHgB,kBAAW;AAAA9B,eAAA,CAbjBc,SAAS,kBAcE,CAACiB,sBAAY,EAAEC,0BAAc,CAAC;AAQtDV,oBAAW,CAACW,UAAU,CAACnB,SAAS,CAAC"}
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","prototype","hasOwnProperty","call","i","set","_defineProperty","obj","key","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","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,CA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C,OAA6B,EAAEC,WAAW,GAAG5C,KAAK,CAAD,CAAC,EAAiB;IAChF,OAAO,KAAI6C,4BAAa,EAACC,oBAAW,CAACC,EAAE,EAAE,IAAI,CAACP,MAAM,EAAEG,OAAO,EAAEA,OAAO,CAACK,qBAAqB,IAAI,CAAC,CAAC,EAAEJ,WAAW,CAAC;EAClH;EAEAK,mBAAmBA,CAAA,EAAG;IACpB,OAAO;MACLC,IAAI,EAAE;IACR,CAAC;EACH;EAKA,aAAaC,QAAQA,CAAC,CAACC,SAAS,EAAEX,QAAQ,CAA6B,EAAE;IACvE,MAAMD,MAAM,GAAGY,SAAS,CAACC,YAAY,CAACP,oBAAW,CAACC,EAAE,CAAC;IACrD,OAAO,IAAIT,SAAS,CAACE,MAAM,EAAEC,QAAQ,CAAC;EACxC;AACF;AAACa,OAAA,CAAAhB,SAAA,GAAAA,SAAA;AAAAd,eAAA,CApBYc,SAAS,aAaHiB,kBAAW;AAAA/B,eAAA,CAbjBc,SAAS,kBAcE,CAACkB,sBAAY,EAAEC,0BAAc,CAAC;AAQtDX,oBAAW,CAACY,UAAU,CAACpB,SAAS,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { BabelCompiler } from './babel.compiler';
1
+ export { BabelCompiler } from '@teambit/compilation.babel-compiler';
2
2
  export type { BabelMain } from './babel.main.runtime';
3
3
  export { BabelAspect } from './babel.aspect';
package/dist/index.js CHANGED
@@ -6,25 +6,25 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "BabelAspect", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _babel2().BabelAspect;
9
+ return _babel().BabelAspect;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "BabelCompiler", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _babel().BabelCompiler;
15
+ return _compilation().BabelCompiler;
16
16
  }
17
17
  });
18
- function _babel() {
19
- const data = require("./babel.compiler");
20
- _babel = function () {
18
+ function _compilation() {
19
+ const data = require("@teambit/compilation.babel-compiler");
20
+ _compilation = function () {
21
21
  return data;
22
22
  };
23
23
  return data;
24
24
  }
25
- function _babel2() {
25
+ function _babel() {
26
26
  const data = require("./babel.aspect");
27
- _babel2 = function () {
27
+ _babel = function () {
28
28
  return data;
29
29
  };
30
30
  return data;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_babel","data","require","_babel2"],"sources":["index.ts"],"sourcesContent":["export { BabelCompiler } from './babel.compiler';\nexport type { BabelMain } from './babel.main.runtime';\nexport { BabelAspect } from './babel.aspect';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
1
+ {"version":3,"names":["_compilation","data","require","_babel"],"sources":["index.ts"],"sourcesContent":["export { BabelCompiler } from '@teambit/compilation.babel-compiler';\nexport type { BabelMain } from './babel.main.runtime';\nexport { BabelAspect } from './babel.aspect';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_babel@1.0.183/dist/babel.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_babel@1.0.183/dist/babel.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_babel@1.0.185/dist/babel.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_babel@1.0.185/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,30 +1,22 @@
1
1
  {
2
2
  "name": "@teambit/babel",
3
- "version": "1.0.183",
3
+ "version": "1.0.185",
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.183"
9
+ "version": "1.0.185"
10
10
  },
11
11
  "dependencies": {
12
12
  "@babel/core": "7.19.6",
13
- "fs-extra": "10.0.0",
14
- "lodash": "4.17.21",
15
- "multimatch": "5.0.0",
16
- "p-map-series": "2.1.0",
17
13
  "@teambit/harmony": "0.4.6",
18
- "@teambit/builder": "1.0.183",
19
- "@teambit/compilation.modules.babel-compiler": "0.0.139",
20
- "@teambit/compiler": "1.0.183",
21
- "@teambit/isolator": "1.0.183",
22
- "@teambit/logger": "0.0.945",
23
- "@teambit/cli": "0.0.852"
14
+ "@teambit/compilation.babel-compiler": "1.1.3",
15
+ "@teambit/cli": "0.0.853",
16
+ "@teambit/compiler": "1.0.185",
17
+ "@teambit/logger": "0.0.946"
24
18
  },
25
19
  "devDependencies": {
26
- "@types/fs-extra": "9.0.7",
27
- "@types/lodash": "4.14.165",
28
20
  "@types/mocha": "9.1.0",
29
21
  "chai": "4.3.0",
30
22
  "@teambit/harmony.envs.core-aspect-env": "0.0.25",
@@ -1,47 +0,0 @@
1
- import * as babel from '@babel/core';
2
- import { BuildContext, BuiltTaskResult } from '@teambit/builder';
3
- import { Compiler, CompilerMain, TranspileFileParams, TranspileFileOutput } from '@teambit/compiler';
4
- import { Logger } from '@teambit/logger';
5
- import { BabelCompilerOptions } from './compiler-options';
6
- export declare class BabelCompiler implements Compiler {
7
- readonly id: string;
8
- private logger;
9
- private compiler;
10
- private options;
11
- private babelModule;
12
- distDir: string;
13
- distGlobPatterns: string[];
14
- shouldCopyNonSupportedFiles: boolean;
15
- artifactName: string;
16
- supportedFilesGlobPatterns: string[] | null;
17
- constructor(id: string, logger: Logger, compiler: CompilerMain, options: BabelCompilerOptions, babelModule?: typeof babel);
18
- displayName: string;
19
- deleteDistDir: boolean;
20
- version(): string;
21
- getDistDir(): string;
22
- /**
23
- * compile one file on the workspace
24
- */
25
- transpileFile(fileContent: string, options: TranspileFileParams): TranspileFileOutput;
26
- /**
27
- * compile multiple components on the capsules
28
- */
29
- build(context: BuildContext): Promise<BuiltTaskResult>;
30
- createTask(name?: string): import("@teambit/compiler").CompilerTask;
31
- private buildOneCapsule;
32
- getArtifactDefinition(): {
33
- generatedBy: string;
34
- name: string;
35
- globPatterns: string[];
36
- }[];
37
- /**
38
- * given a source file, return its parallel in the dists. e.g. index.ts => dist/index.js
39
- */
40
- getDistPathBySrcPath(srcPath: string): string;
41
- /**
42
- * whether babel is able to compile the given path
43
- */
44
- isFileSupported(filePath: string): boolean;
45
- displayConfig(): string;
46
- private replaceFileExtToJs;
47
- }
@@ -1,199 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BabelCompiler = void 0;
7
- function babel() {
8
- const data = _interopRequireWildcard(require("@babel/core"));
9
- babel = function () {
10
- return data;
11
- };
12
- return data;
13
- }
14
- function _multimatch() {
15
- const data = _interopRequireDefault(require("multimatch"));
16
- _multimatch = function () {
17
- return data;
18
- };
19
- return data;
20
- }
21
- function _lodash() {
22
- const data = require("lodash");
23
- _lodash = function () {
24
- return data;
25
- };
26
- return data;
27
- }
28
- function _pMapSeries() {
29
- const data = _interopRequireDefault(require("p-map-series"));
30
- _pMapSeries = function () {
31
- return data;
32
- };
33
- return data;
34
- }
35
- function _fsExtra() {
36
- const data = _interopRequireDefault(require("fs-extra"));
37
- _fsExtra = function () {
38
- return data;
39
- };
40
- return data;
41
- }
42
- function _path() {
43
- const data = _interopRequireDefault(require("path"));
44
- _path = function () {
45
- return data;
46
- };
47
- return data;
48
- }
49
- function _compilationModules() {
50
- const data = require("@teambit/compilation.modules.babel-compiler");
51
- _compilationModules = function () {
52
- return data;
53
- };
54
- return data;
55
- }
56
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
57
- 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); }
58
- 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 && Object.prototype.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; }
59
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
60
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
61
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
62
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
63
- 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); }
64
- class BabelCompiler {
65
- constructor(id, logger, compiler, options, babelModule = babel()) {
66
- this.id = id;
67
- this.logger = logger;
68
- this.compiler = compiler;
69
- this.options = options;
70
- this.babelModule = babelModule;
71
- _defineProperty(this, "distDir", void 0);
72
- _defineProperty(this, "distGlobPatterns", void 0);
73
- _defineProperty(this, "shouldCopyNonSupportedFiles", void 0);
74
- _defineProperty(this, "artifactName", void 0);
75
- _defineProperty(this, "supportedFilesGlobPatterns", void 0);
76
- _defineProperty(this, "displayName", 'Babel');
77
- _defineProperty(this, "deleteDistDir", false);
78
- this.distDir = options.distDir || 'dist';
79
- this.distGlobPatterns = options.distGlobPatterns || [`${this.distDir}/**`, `!${this.distDir}/tsconfig.tsbuildinfo`];
80
- this.shouldCopyNonSupportedFiles = typeof options.shouldCopyNonSupportedFiles === 'boolean' ? options.shouldCopyNonSupportedFiles : true;
81
- this.artifactName = options.artifactName || 'dist';
82
- this.supportedFilesGlobPatterns = options.supportedFilesGlobPatterns ? (0, _lodash().flatten)(options.supportedFilesGlobPatterns) : null;
83
- }
84
- version() {
85
- return this.babelModule.version;
86
- }
87
- getDistDir() {
88
- return this.distDir;
89
- }
90
-
91
- /**
92
- * compile one file on the workspace
93
- */
94
- transpileFile(fileContent, options) {
95
- const supportedExtensions = ['.ts', '.tsx', '.js', '.jsx'];
96
- const fileExtension = _path().default.extname(options.filePath);
97
- if (!supportedExtensions.includes(fileExtension) || options.filePath.endsWith('.d.ts')) {
98
- return null; // file is not supported
99
- }
100
- const transformOptions = this.options.babelTransformOptions || {};
101
- const context = {
102
- filePath: options.filePath,
103
- rootDir: options.componentDir
104
- };
105
- const outputFiles = (0, _compilationModules().transpileFileContent)(fileContent, context, transformOptions, this.babelModule);
106
- return outputFiles;
107
- }
108
-
109
- /**
110
- * compile multiple components on the capsules
111
- */
112
- async build(context) {
113
- const capsules = context.capsuleNetwork.seedersCapsules;
114
- const componentsResults = [];
115
- const longProcessLogger = this.logger.createLongProcessLogger('compile babel components', capsules.length);
116
- await (0, _pMapSeries().default)(capsules, async capsule => {
117
- const currentComponentResult = {
118
- errors: [],
119
- component: capsule.component
120
- };
121
- longProcessLogger.logProgress(capsule.component.id.toString());
122
- await this.buildOneCapsule(capsule, currentComponentResult);
123
- componentsResults.push(_objectSpread({}, currentComponentResult));
124
- });
125
- return {
126
- artifacts: this.getArtifactDefinition(),
127
- componentsResults
128
- };
129
- }
130
- createTask(name = 'BabelCompiler') {
131
- return this.compiler.createTask(name, this);
132
- }
133
- async buildOneCapsule(capsule, componentResult) {
134
- componentResult.startTime = Date.now();
135
- const sourceFiles = capsule.component.filesystem.files.map(file => file.relative);
136
- await _fsExtra().default.ensureDir(_path().default.join(capsule.path, this.distDir));
137
- await Promise.all(sourceFiles.map(async filePath => {
138
- if (this.isFileSupported(filePath)) {
139
- const absoluteFilePath = _path().default.join(capsule.path, filePath);
140
- this.options.babelTransformOptions ||= {};
141
- this.options.babelTransformOptions.sourceFileName = _path().default.basename(filePath);
142
- this.options.babelTransformOptions.filename = _path().default.basename(filePath);
143
- try {
144
- const result = await (0, _compilationModules().transpileFilePathAsync)(absoluteFilePath, this.options.babelTransformOptions || {}, this.babelModule);
145
- if (!result || !result.length) {
146
- this.logger.debug(`getting an empty response from Babel for the file ${filePath}. it might be configured to be ignored`);
147
- return;
148
- }
149
- // Make sure to get only the relative path of the dist because we want to add the dist dir.
150
- // If we use the result outputPath we will get an absolute path here
151
- const distPath = this.replaceFileExtToJs(filePath);
152
- const distPathMap = `${distPath}.map`;
153
- await _fsExtra().default.outputFile(_path().default.join(capsule.path, this.distDir, distPath), result[0].outputText);
154
- if (result.length > 1) {
155
- await _fsExtra().default.outputFile(_path().default.join(capsule.path, this.distDir, distPathMap), result[1].outputText);
156
- }
157
- } catch (err) {
158
- componentResult.errors?.push(err);
159
- }
160
- }
161
- }));
162
- componentResult.endTime = Date.now();
163
- }
164
- getArtifactDefinition() {
165
- return [{
166
- generatedBy: this.id,
167
- name: this.artifactName,
168
- globPatterns: this.distGlobPatterns
169
- }];
170
- }
171
-
172
- /**
173
- * given a source file, return its parallel in the dists. e.g. index.ts => dist/index.js
174
- */
175
- getDistPathBySrcPath(srcPath) {
176
- const fileWithJSExtIfNeeded = this.replaceFileExtToJs(srcPath);
177
- return _path().default.join(this.distDir, fileWithJSExtIfNeeded);
178
- }
179
-
180
- /**
181
- * whether babel is able to compile the given path
182
- */
183
- isFileSupported(filePath) {
184
- if (this.supportedFilesGlobPatterns) {
185
- return (0, _compilationModules().isFileSupported)(filePath) && !!(0, _multimatch().default)(filePath, this.supportedFilesGlobPatterns).length;
186
- }
187
- return (0, _compilationModules().isFileSupported)(filePath);
188
- }
189
- displayConfig() {
190
- return JSON.stringify(this.options.babelTransformOptions || {}, null, 2);
191
- }
192
- replaceFileExtToJs(filePath) {
193
- if (!this.isFileSupported(filePath)) return filePath;
194
- return (0, _compilationModules().replaceFileExtToJs)(filePath);
195
- }
196
- }
197
- exports.BabelCompiler = BabelCompiler;
198
-
199
- //# sourceMappingURL=babel.compiler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["babel","data","_interopRequireWildcard","require","_multimatch","_interopRequireDefault","_lodash","_pMapSeries","_fsExtra","_path","_compilationModules","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","key","value","_toPropertyKey","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","BabelCompiler","constructor","id","logger","compiler","options","babelModule","distDir","distGlobPatterns","shouldCopyNonSupportedFiles","artifactName","supportedFilesGlobPatterns","flatten","version","getDistDir","transpileFile","fileContent","supportedExtensions","fileExtension","path","extname","filePath","includes","endsWith","transformOptions","babelTransformOptions","context","rootDir","componentDir","outputFiles","transpileFileContent","build","capsules","capsuleNetwork","seedersCapsules","componentsResults","longProcessLogger","createLongProcessLogger","mapSeries","capsule","currentComponentResult","errors","component","logProgress","toString","buildOneCapsule","artifacts","getArtifactDefinition","createTask","name","componentResult","startTime","Date","now","sourceFiles","filesystem","files","map","file","relative","fs","ensureDir","join","Promise","all","isFileSupported","absoluteFilePath","sourceFileName","basename","filename","result","transpileFilePathAsync","debug","distPath","replaceFileExtToJs","distPathMap","outputFile","outputText","err","endTime","generatedBy","globPatterns","getDistPathBySrcPath","srcPath","fileWithJSExtIfNeeded","multimatch","displayConfig","JSON","stringify","exports"],"sources":["babel.compiler.ts"],"sourcesContent":["import * as babel from '@babel/core';\nimport multimatch from 'multimatch';\nimport { flatten } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport fs from 'fs-extra';\nimport { BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\nimport { Compiler, CompilerMain, TranspileFileParams, TranspileFileOutput } from '@teambit/compiler';\nimport { Capsule } from '@teambit/isolator';\nimport { Logger } from '@teambit/logger';\nimport path from 'path';\nimport {\n isFileSupported,\n transpileFileContent,\n transpileFilePathAsync,\n replaceFileExtToJs,\n TranspileContext,\n} from '@teambit/compilation.modules.babel-compiler';\nimport { BabelCompilerOptions } from './compiler-options';\n\nexport class BabelCompiler implements Compiler {\n distDir: string;\n distGlobPatterns: string[];\n shouldCopyNonSupportedFiles: boolean;\n artifactName: string;\n supportedFilesGlobPatterns: string[] | null;\n constructor(\n readonly id: string,\n private logger: Logger,\n private compiler: CompilerMain,\n private options: BabelCompilerOptions,\n private babelModule = babel\n ) {\n this.distDir = options.distDir || 'dist';\n this.distGlobPatterns = options.distGlobPatterns || [`${this.distDir}/**`, `!${this.distDir}/tsconfig.tsbuildinfo`];\n this.shouldCopyNonSupportedFiles =\n typeof options.shouldCopyNonSupportedFiles === 'boolean' ? options.shouldCopyNonSupportedFiles : true;\n this.artifactName = options.artifactName || 'dist';\n this.supportedFilesGlobPatterns = options.supportedFilesGlobPatterns\n ? flatten(options.supportedFilesGlobPatterns)\n : null;\n }\n\n displayName = 'Babel';\n deleteDistDir = false;\n\n version() {\n return this.babelModule.version;\n }\n\n getDistDir() {\n return this.distDir;\n }\n\n /**\n * compile one file on the workspace\n */\n transpileFile(fileContent: string, options: TranspileFileParams): TranspileFileOutput {\n const supportedExtensions = ['.ts', '.tsx', '.js', '.jsx'];\n const fileExtension = path.extname(options.filePath);\n if (!supportedExtensions.includes(fileExtension) || options.filePath.endsWith('.d.ts')) {\n return null; // file is not supported\n }\n const transformOptions = this.options.babelTransformOptions || {};\n const context: TranspileContext = {\n filePath: options.filePath,\n rootDir: options.componentDir,\n };\n const outputFiles = transpileFileContent(fileContent, context, transformOptions, this.babelModule);\n return outputFiles;\n }\n\n /**\n * compile multiple components on the capsules\n */\n async build(context: BuildContext): Promise<BuiltTaskResult> {\n const capsules = context.capsuleNetwork.seedersCapsules;\n const componentsResults: ComponentResult[] = [];\n const longProcessLogger = this.logger.createLongProcessLogger('compile babel components', capsules.length);\n await mapSeries(capsules, async (capsule) => {\n const currentComponentResult: ComponentResult = {\n errors: [],\n component: capsule.component,\n };\n longProcessLogger.logProgress(capsule.component.id.toString());\n await this.buildOneCapsule(capsule, currentComponentResult);\n componentsResults.push({ ...currentComponentResult });\n });\n\n return {\n artifacts: this.getArtifactDefinition(),\n componentsResults,\n };\n }\n\n createTask(name = 'BabelCompiler') {\n return this.compiler.createTask(name, this);\n }\n\n private async buildOneCapsule(capsule: Capsule, componentResult: ComponentResult) {\n componentResult.startTime = Date.now();\n const sourceFiles = capsule.component.filesystem.files.map((file) => file.relative);\n await fs.ensureDir(path.join(capsule.path, this.distDir));\n await Promise.all(\n sourceFiles.map(async (filePath) => {\n if (this.isFileSupported(filePath)) {\n const absoluteFilePath = path.join(capsule.path, filePath);\n this.options.babelTransformOptions ||= {};\n this.options.babelTransformOptions.sourceFileName = path.basename(filePath);\n this.options.babelTransformOptions.filename = path.basename(filePath);\n try {\n const result = await transpileFilePathAsync(\n absoluteFilePath,\n this.options.babelTransformOptions || {},\n this.babelModule\n );\n if (!result || !result.length) {\n this.logger.debug(\n `getting an empty response from Babel for the file ${filePath}. it might be configured to be ignored`\n );\n return;\n }\n // Make sure to get only the relative path of the dist because we want to add the dist dir.\n // If we use the result outputPath we will get an absolute path here\n const distPath = this.replaceFileExtToJs(filePath);\n const distPathMap = `${distPath}.map`;\n await fs.outputFile(path.join(capsule.path, this.distDir, distPath), result[0].outputText);\n if (result.length > 1) {\n await fs.outputFile(path.join(capsule.path, this.distDir, distPathMap), result[1].outputText);\n }\n } catch (err: any) {\n componentResult.errors?.push(err);\n }\n }\n })\n );\n componentResult.endTime = Date.now();\n }\n\n getArtifactDefinition() {\n return [\n {\n generatedBy: this.id,\n name: this.artifactName,\n globPatterns: this.distGlobPatterns,\n },\n ];\n }\n\n /**\n * given a source file, return its parallel in the dists. e.g. index.ts => dist/index.js\n */\n getDistPathBySrcPath(srcPath: string) {\n const fileWithJSExtIfNeeded = this.replaceFileExtToJs(srcPath);\n return path.join(this.distDir, fileWithJSExtIfNeeded);\n }\n\n /**\n * whether babel is able to compile the given path\n */\n isFileSupported(filePath: string): boolean {\n if (this.supportedFilesGlobPatterns) {\n return isFileSupported(filePath) && !!multimatch(filePath, this.supportedFilesGlobPatterns).length;\n }\n return isFileSupported(filePath);\n }\n\n displayConfig() {\n return JSON.stringify(this.options.babelTransformOptions || {}, null, 2);\n }\n\n private replaceFileExtToJs(filePath: string): string {\n if (!this.isFileSupported(filePath)) return filePath;\n return replaceFileExtToJs(filePath);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAI,WAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAQ,MAAA;EAAA,MAAAR,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAM,KAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,oBAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,mBAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMqD,SAAAI,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,E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