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
exports[`Transpiler should keep names of files, even if special chars with a simple setup and import correctly 2`] = `"{\\"version\\":3,\\"file\\":\\"$$simple$$.js\\",\\"sources\\":[\\"../../testfiles/SpecialChars/$$simple$$.js\\"],\\"sourcesContent\\":[\\"import path from 'path';\\\\n// this weird import are only necessary because we test within the SDK itself.\\\\n// eslint-disable-next-line security/detect-non-literal-require, no-undef\\\\nconst {File} = require(path.resolve(__dirname, '../../../../components'));\\\\nconst greetings = name => \`hello \${name}\`;\\\\n// eslint-disable-next-line react/display-name\\\\nexport default function() {\\\\n return (\\\\n <File>\\\\n {greetings('Test')}\\\\n </File>\\\\n );\\\\n}\\"],\\"names\\":[\\"File\\",\\"require\\",\\"path\\",\\"resolve\\",\\"__dirname\\",\\"greetings\\",\\"name\\",\\"_jsx\\"],\\"mappings\\":\\";;;;;;;;;;AAEA;;AACA,MAAM;AAACA,EAAAA;AAAD,IAASC,OAAO,CAACC,wBAAI,CAACC,OAAL,CAAaC,SAAb,EAAwB,wBAAxB,CAAD,CAAtB;;AACA,MAAMC,SAAS,GAAGC,IAAI,IAAK,SAAQA,IAAK,EAAxC;;;AAEe,uBAAW;AACxB,sBACEC,eAAC,IAAD;AAAA,cACGF,SAAS,CAAC,MAAD;AADZ,IADF;AAKD;;;;\\"}"`;
26
+
exports[`Transpiler should keep names of files, even if special chars with a simple setup and import correctly 2`] = `"{"version":3,"file":"$$simple$$.js","sources":["../../testfiles/SpecialChars/$$simple$$.js"],"sourcesContent":["import path from 'path';\\n// this weird import are only necessary because we test within the SDK itself.\\n// eslint-disable-next-line security/detect-non-literal-require, no-undef\\nconst {File} = require(path.resolve(__dirname, '../../../../components'));\\nconst greetings = name => \`hello \${name}\`;\\n// eslint-disable-next-line react/display-name\\nexport default function() {\\n return (\\n <File>\\n {greetings('Test')}\\n </File>\\n );\\n}"],"names":["File","require","path","resolve","__dirname","greetings","name","_jsx","children"],"mappings":";;;;;;AAGA,MAAM;AAACA,EAAAA,IAAAA;AAAI,CAAC,GAAGC,OAAO,CAACC,IAAI,CAACC,OAAO,CAACC,SAAS,EAAE,wBAAwB,CAAC,CAAC,CAAA;AACzE,MAAMC,SAAS,GAAGC,IAAI,IAAK,CAAA,MAAA,EAAQA,IAAK,CAAC,CAAA,CAAA;AACzC;AACe,mBAAW,IAAA;EACxB,oBACEC,cAAA,CAACP,IAAI,EAAA;IAAAQ,QAAA,EACFH,SAAS,CAAC,MAAM,CAAA;AAAC,GACd,CAAC,CAAA;AAEX;;;;"}"`;
35
27
36
28
exports[`Transpiler should transpile CommonJS files with a simple setup and import correctly 1`] =`
37
29
"'use strict';
38
30
39
-
var jsxRuntime = require('react/cjs/react-jsx-runtime.production.min');
40
31
require('source-map-support/register');
32
+
var jsxRuntime = require('react/jsx-runtime');
41
33
42
34
/* eslint-disable no-undef */
43
-
const path = require('path'); // this weird import are only necessary because we test within the SDK itself.
35
+
const path = require('path');
36
+
// this weird import are only necessary because we test within the SDK itself.
@@ -62,30 +51,22 @@ module.exports = function () {
62
51
"
63
52
`;
64
53
65
-
exports[`Transpiler should transpile CommonJS files with a simple setup and import correctly 2`] = `"{\\"version\\":3,\\"file\\":\\"simple.js\\",\\"sources\\":[\\"../../testfiles/CommonJS/simple.js\\"],\\"sourcesContent\\":[\\"/* eslint-disable no-undef */\\\\nconst path = require('path');\\\\n// this weird import are only necessary because we test within the SDK itself.\\\\n// eslint-disable-next-line security/detect-non-literal-require\\\\nconst {File} = require(path.resolve(__dirname, '../../../../components'));\\\\nfunction greetings(name) {\\\\n return \`hello \${name}\`;\\\\n}\\\\n// eslint-disable-next-line react/display-name\\\\nmodule.exports = function() {\\\\n return (\\\\n <File>\\\\n {greetings('Test')}\\\\n </File>\\\\n );\\\\n};\\"],\\"names\\":[\\"path\\",\\"require\\",\\"File\\",\\"resolve\\",\\"__dirname\\",\\"greetings\\",\\"name\\",\\"module\\",\\"exports\\",\\"_jsx\\"],\\"mappings\\":\\";;;;;AAAA;AACA,MAAMA,IAAI,GAAGC,OAAO,CAAC,MAAD,CAApB;AAEA;;;AACA,MAAM;AAACC,EAAAA;AAAD,IAASD,OAAO,CAACD,IAAI,CAACG,OAAL,CAAaC,SAAb,EAAwB,wBAAxB,CAAD,CAAtB;;AACA,SAASC,SAAT,CAAmBC,IAAnB,EAAyB;AACvB,SAAQ,SAAQA,IAAK,EAArB;AACD;;;AAEDC,MAAM,CAACC,OAAP,GAAiB,YAAW;AAC1B,sBACEC,eAAC,IAAD;AAAA,cACGJ,SAAS,CAAC,MAAD;AADZ,IADF;AAKD,CAND;;\\"}"`;
54
+
exports[`Transpiler should transpile CommonJS files with a simple setup and import correctly 2`] = `"{"version":3,"file":"simple.js","sources":["../../testfiles/CommonJS/simple.js"],"sourcesContent":["/* eslint-disable no-undef */\\nconst path = require('path');\\n// this weird import are only necessary because we test within the SDK itself.\\n// eslint-disable-next-line security/detect-non-literal-require\\nconst {File} = require(path.resolve(__dirname, '../../../../components'));\\nfunction greetings(name) {\\n return \`hello \${name}\`;\\n}\\n// eslint-disable-next-line react/display-name\\nmodule.exports = function() {\\n return (\\n <File>\\n {greetings('Test')}\\n </File>\\n );\\n};"],"names":["path","require","File","resolve","__dirname","greetings","name","module","exports","_jsx","children"],"mappings":";;;;;AAAA;AACA,MAAMA,IAAI,GAAGC,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B;AACA;AACA,MAAM;AAACC,EAAAA,IAAAA;AAAI,CAAC,GAAGD,OAAO,CAACD,IAAI,CAACG,OAAO,CAACC,SAAS,EAAE,wBAAwB,CAAC,CAAC,CAAA;AACzE,SAASC,SAASA,CAACC,IAAI,EAAE;EACvB,OAAQ,CAAA,MAAA,EAAQA,IAAK,CAAC,CAAA,CAAA;AACxB,CAAA;AACA;AACAC,MAAM,CAACC,OAAO,GAAG,YAAW;EAC1B,oBACEC,cAAA,CAACP,IAAI,EAAA;IAAAQ,QAAA,EACFL,SAAS,CAAC,MAAM,CAAA;AAAC,GACd,CAAC,CAAA;AAEX,CAAC;;"}"`;
66
55
67
56
exports[`Transpiler should transpile ES5 files with a simple setup and import correctly 1`] =`
68
57
"'use strict';
69
58
70
-
var jsxRuntime = require('react/cjs/react-jsx-runtime.production.min');
71
59
require('source-map-support/register');
72
60
var path = require('path');
73
-
74
-
function _interopDefaultLegacy (e) {returne&&typeofe==='object'&&'default'ine?e: { 'default': e }; }
75
-
76
-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
exports[`Transpiler should transpile ES5 files with a simple setup and import correctly 2`] = `"{\\"version\\":3,\\"file\\":\\"simple.js\\",\\"sources\\":[\\"../../testfiles/ES5/simple.js\\"],\\"sourcesContent\\":[\\"import path from 'path';\\\\n// this weird import are only necessary because we test within the SDK itself.\\\\n// eslint-disable-next-line security/detect-non-literal-require, no-undef\\\\nconst {File} = require(path.resolve(__dirname, '../../../../components'));\\\\nfunction greetings(name) {\\\\n return \`hello \${name}\`;\\\\n}\\\\n// eslint-disable-next-line react/display-name\\\\nexport default function() {\\\\n return (\\\\n <File>\\\\n {greetings('Test')}\\\\n </File>\\\\n );\\\\n}\\"],\\"names\\":[\\"File\\",\\"require\\",\\"path\\",\\"resolve\\",\\"__dirname\\",\\"greetings\\",\\"name\\",\\"_jsx\\"],\\"mappings\\":\\";;;;;;;;;;AAEA;;AACA,MAAM;AAACA,EAAAA;AAAD,IAASC,OAAO,CAACC,wBAAI,CAACC,OAAL,CAAaC,SAAb,EAAwB,wBAAxB,CAAD,CAAtB;;AACA,SAASC,SAAT,CAAmBC,IAAnB,EAAyB;AACvB,SAAQ,SAAQA,IAAK,EAArB;AACD;;;AAEc,mBAAW;AACxB,sBACEC,eAAC,IAAD;AAAA,cACGF,SAAS,CAAC,MAAD;AADZ,IADF;AAKD;;;;\\"}"`;
81
+
exports[`Transpiler should transpile ES5 files with a simple setup and import correctly 2`] = `"{"version":3,"file":"simple.js","sources":["../../testfiles/ES5/simple.js"],"sourcesContent":["import path from 'path';\\n// this weird import are only necessary because we test within the SDK itself.\\n// eslint-disable-next-line security/detect-non-literal-require, no-undef\\nconst {File} = require(path.resolve(__dirname, '../../../../components'));\\nfunction greetings(name) {\\n return \`hello \${name}\`;\\n}\\n// eslint-disable-next-line react/display-name\\nexport default function() {\\n return (\\n <File>\\n {greetings('Test')}\\n </File>\\n );\\n}"],"names":["File","require","path","resolve","__dirname","greetings","name","_jsx","children"],"mappings":";;;;;;AAGA,MAAM;AAACA,EAAAA,IAAAA;AAAI,CAAC,GAAGC,OAAO,CAACC,IAAI,CAACC,OAAO,CAACC,SAAS,EAAE,wBAAwB,CAAC,CAAC,CAAA;AACzE,SAASC,SAASA,CAACC,IAAI,EAAE;EACvB,OAAQ,CAAA,MAAA,EAAQA,IAAK,CAAC,CAAA,CAAA;AACxB,CAAA;AACA;AACe,eAAW,IAAA;EACxB,oBACEC,cAAA,CAACP,IAAI,EAAA;IAAAQ,QAAA,EACFH,SAAS,CAAC,MAAM,CAAA;AAAC,GACd,CAAC,CAAA;AAEX;;;;"}"`;
101
82
102
83
exports[`Transpiler should transpile ES6 files with a simple setup and import correctly 1`] =`
103
84
"'use strict';
104
85
105
-
var jsxRuntime = require('react/cjs/react-jsx-runtime.production.min');
106
86
require('source-map-support/register');
107
87
var path = require('path');
108
-
109
-
function _interopDefaultLegacy (e) {returne&&typeofe==='object'&&'default'ine?e: { 'default': e }; }
110
-
111
-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
exports[`Transpiler should transpile ES6 files with a simple setup and import correctly 2`] = `"{\\"version\\":3,\\"file\\":\\"simple.js\\",\\"sources\\":[\\"../../testfiles/ES6/simple.js\\"],\\"sourcesContent\\":[\\"import path from 'path';\\\\n// this weird import are only necessary because we test within the SDK itself.\\\\n// eslint-disable-next-line security/detect-non-literal-require, no-undef\\\\nconst {File} = require(path.resolve(__dirname, '../../../../components'));\\\\nconst greetings = name => \`hello \${name}\`;\\\\n// eslint-disable-next-line react/display-name\\\\nexport default function() {\\\\n return (\\\\n <File>\\\\n {greetings('Test')}\\\\n </File>\\\\n );\\\\n}\\"],\\"names\\":[\\"File\\",\\"require\\",\\"path\\",\\"resolve\\",\\"__dirname\\",\\"greetings\\",\\"name\\",\\"_jsx\\"],\\"mappings\\":\\";;;;;;;;;;AAEA;;AACA,MAAM;AAACA,EAAAA;AAAD,IAASC,OAAO,CAACC,wBAAI,CAACC,OAAL,CAAaC,SAAb,EAAwB,wBAAxB,CAAD,CAAtB;;AACA,MAAMC,SAAS,GAAGC,IAAI,IAAK,SAAQA,IAAK,EAAxC;;;AAEe,mBAAW;AACxB,sBACEC,eAAC,IAAD;AAAA,cACGF,SAAS,CAAC,MAAD;AADZ,IADF;AAKD;;;;\\"}"`;
106
+
exports[`Transpiler should transpile ES6 files with a simple setup and import correctly 2`] = `"{"version":3,"file":"simple.js","sources":["../../testfiles/ES6/simple.js"],"sourcesContent":["import path from 'path';\\n// this weird import are only necessary because we test within the SDK itself.\\n// eslint-disable-next-line security/detect-non-literal-require, no-undef\\nconst {File} = require(path.resolve(__dirname, '../../../../components'));\\nconst greetings = name => \`hello \${name}\`;\\n// eslint-disable-next-line react/display-name\\nexport default function() {\\n return (\\n <File>\\n {greetings('Test')}\\n </File>\\n );\\n}"],"names":["File","require","path","resolve","__dirname","greetings","name","_jsx","children"],"mappings":";;;;;;AAGA,MAAM;AAACA,EAAAA,IAAAA;AAAI,CAAC,GAAGC,OAAO,CAACC,IAAI,CAACC,OAAO,CAACC,SAAS,EAAE,wBAAwB,CAAC,CAAC,CAAA;AACzE,MAAMC,SAAS,GAAGC,IAAI,IAAK,CAAA,MAAA,EAAQA,IAAK,CAAC,CAAA,CAAA;AACzC;AACe,eAAW,IAAA;EACxB,oBACEC,cAAA,CAACP,IAAI,EAAA;IAAAQ,QAAA,EACFH,SAAS,CAAC,MAAM,CAAA;AAAC,GACd,CAAC,CAAA;AAEX;;;;"}"`;
0 commit comments