Skip to content

Commit 2ebd138

Browse files
committed
feat: update dependencies
1 parent 996af9f commit 2ebd138

File tree

9 files changed

+3511
-5202
lines changed

9 files changed

+3511
-5202
lines changed

package-lock.json

+3,456-5,102
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+21-20
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,30 @@
3131
],
3232
"dependencies": {
3333
"@asyncapi/parser": "^3.0.7",
34-
"@babel/core": "7.12.9",
35-
"@babel/preset-env": "^7.12.7",
36-
"@babel/preset-react": "^7.12.7",
37-
"@rollup/plugin-babel": "^5.2.1",
38-
"babel-plugin-source-map-support": "^2.1.3",
39-
"prop-types": "^15.7.2",
40-
"react": "^17.0.1",
41-
"rollup": "^2.60.1",
42-
"source-map-support": "^0.5.19"
34+
"@babel/core": "7.24.0",
35+
"@babel/preset-env": "^7.24.0",
36+
"@babel/preset-react": "^7.23.3",
37+
"@rollup/plugin-babel": "^6.0.4",
38+
"babel-plugin-source-map-support": "^2.2.0",
39+
"prop-types": "^15.8.1",
40+
"react": "^18.2.0",
41+
"react-dom": "^18.2.0",
42+
"rollup": "^4.13.0",
43+
"source-map-support": "^0.5.21"
4344
},
4445
"devDependencies": {
45-
"@types/jest": "^26.0.15",
46-
"@types/react": "^17.0.0",
47-
"cross-env": "^7.0.2",
48-
"eslint": "^8.46.0",
49-
"eslint-plugin-react": "^7.33.1",
50-
"eslint-plugin-security": "^1.7.1",
51-
"eslint-plugin-sonarjs": "^0.20.0",
52-
"jest": "^26.6.3",
53-
"jsdoc-to-markdown": "^8.0.0",
46+
"@types/jest": "^29.5.12",
47+
"@types/react": "^18.2.65",
48+
"cross-env": "^7.0.3",
49+
"eslint": "^8.57.0",
50+
"eslint-plugin-react": "^7.34.0",
51+
"eslint-plugin-security": "^2.1.1",
52+
"eslint-plugin-sonarjs": "^0.24.0",
53+
"jest": "^29.7.0",
54+
"jsdoc-to-markdown": "^8.0.1",
5455
"markdown-toc": "^1.2.0",
55-
"ts-jest": "^26.4.4",
56-
"typescript": "^4.1.2"
56+
"ts-jest": "^29.1.2",
57+
"typescript": "^5.4.2"
5758
},
5859
"scripts": {
5960
"start": "tsc --watch",

src/components/File.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import PropTypes from 'prop-types';
2+
import { PropsWithChildren } from 'react';
23

34
import { FunctionComponent } from "../types";
45

@@ -35,7 +36,7 @@ export const FilePropTypes = {
3536
* <File name={name} permissions={permissions}>Test</File>
3637
* )
3738
*/
38-
const File: FunctionComponent<FileProps> = ({ children }) => {
39+
const File: FunctionComponent<PropsWithChildren<FileProps>> = ({ children }) => {
3940
return <>{children}</>;
4041
};
4142

src/components/Indent.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import PropTypes from 'prop-types';
2+
import { PropsWithChildren } from 'react';
23

34
import { IndentationTypes, withIndendation } from "../utils";
45
import { FunctionComponent } from "../types";
@@ -38,7 +39,7 @@ export const IndentPropTypes = {
3839
* <Indent size={size} type={type}>test</Indent>
3940
* )
4041
*/
41-
const Indent: FunctionComponent<IndentProps> = ({ size = 0, type = IndentationTypes.SPACES, childrenContent }) => {
42+
const Indent: FunctionComponent<PropsWithChildren<IndentProps>> = ({ size = 0, type = IndentationTypes.SPACES, childrenContent }) => {
4243
return <>{withIndendation(childrenContent, size, type)}</>;
4344
};
4445

src/components/Text.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import PropTypes from 'prop-types';
2+
import { PropsWithChildren } from 'react';
23

34
import { IndentationTypes, withIndendation, withNewLines } from "../utils";
45
import { FunctionComponent } from "../types";
@@ -45,7 +46,7 @@ export const TextPropTypes = {
4546
* <Text indent={size} type={type} newLines={newLines}>Test</Text>
4647
* )
4748
*/
48-
const Text: FunctionComponent<TextProps> = ({ indent = 0, type = IndentationTypes.SPACES, newLines = 1, childrenContent }) => {
49+
const Text: FunctionComponent<PropsWithChildren<TextProps>> = ({ indent = 0, type = IndentationTypes.SPACES, newLines = 1, childrenContent }) => {
4950
const contentWithLines = withNewLines(childrenContent, newLines);
5051
return <>{withIndendation(contentWithLines, indent, type)}</>;
5152
};

src/renderer/__tests__/renderer.spec.tsx

+3-16
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,8 @@ describe('Renderer', () => {
129129
return null;
130130
}
131131

132-
let error = undefined;
133-
try {
134-
render(<Component />);
135-
} catch(err) {
136-
error = err;
137-
}
138-
// check substring of the desired error
139-
expect((error as Error).message).toContain('Invalid hook call.');
132+
// A console.error() will be printed due to illegal use of hooks but only in development mode
133+
expect(() => render(<Component />)).toThrow("Cannot read properties of null (reading 'useState')");
140134
});
141135

142136
test('should skips internal React components', () => {
@@ -161,13 +155,6 @@ describe('Renderer', () => {
161155
)
162156
}
163157

164-
let error = undefined;
165-
try {
166-
render(<Component />);
167-
} catch(err) {
168-
error = err;
169-
}
170-
// check substring of the desired error
171-
expect((error as Error).message).toEqual('HTML tags is not supported yet.');
158+
expect(() => render(<Component />)).toThrow('HTML tags is not supported yet.');
172159
});
173160
});

src/transpiler/__tests__/__snapshots__/transpiler.spec.tsx.snap

+21-48
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,15 @@
33
exports[`Transpiler should keep names of files, even if special chars with a simple setup and import correctly 1`] = `
44
"'use strict';
55
6-
var jsxRuntime = require('react/cjs/react-jsx-runtime.production.min');
76
require('source-map-support/register');
87
var path = require('path');
9-
10-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11-
12-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
13-
14-
// eslint-disable-next-line security/detect-non-literal-require, no-undef
8+
var jsxRuntime = require('react/jsx-runtime');
159
1610
const {
1711
File
18-
} = require(path__default[\\"default\\"].resolve(__dirname, '../../../../components'));
19-
20-
const greetings = name => \`hello \${name}\`; // eslint-disable-next-line react/display-name
21-
22-
12+
} = require(path.resolve(__dirname, '../../../../components'));
13+
const greetings = name => \`hello \${name}\`;
14+
// eslint-disable-next-line react/display-name
2315
function $$simple$$ () {
2416
return /*#__PURE__*/jsxRuntime.jsx(File, {
2517
children: greetings('Test')
@@ -31,28 +23,25 @@ module.exports = $$simple$$;
3123
"
3224
`;
3325

34-
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;;;;"}"`;
3527

3628
exports[`Transpiler should transpile CommonJS files with a simple setup and import correctly 1`] = `
3729
"'use strict';
3830
39-
var jsxRuntime = require('react/cjs/react-jsx-runtime.production.min');
4031
require('source-map-support/register');
32+
var jsxRuntime = require('react/jsx-runtime');
4133
4234
/* 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.
4437
// eslint-disable-next-line security/detect-non-literal-require
45-
46-
4738
const {
4839
File
4940
} = require(path.resolve(__dirname, '../../../../components'));
50-
5141
function greetings(name) {
5242
return \`hello \${name}\`;
53-
} // eslint-disable-next-line react/display-name
54-
55-
43+
}
44+
// eslint-disable-next-line react/display-name
5645
module.exports = function () {
5746
return /*#__PURE__*/jsxRuntime.jsx(File, {
5847
children: greetings('Test')
@@ -62,30 +51,22 @@ module.exports = function () {
6251
"
6352
`;
6453
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;;"}"`;
6655
6756
exports[`Transpiler should transpile ES5 files with a simple setup and import correctly 1`] = `
6857
"'use strict';
6958
70-
var jsxRuntime = require('react/cjs/react-jsx-runtime.production.min');
7159
require('source-map-support/register');
7260
var path = require('path');
73-
74-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
75-
76-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
77-
78-
// eslint-disable-next-line security/detect-non-literal-require, no-undef
61+
var jsxRuntime = require('react/jsx-runtime');
7962
8063
const {
8164
File
82-
} = require(path__default[\\"default\\"].resolve(__dirname, '../../../../components'));
83-
65+
} = require(path.resolve(__dirname, '../../../../components'));
8466
function greetings(name) {
8567
return \`hello \${name}\`;
86-
} // eslint-disable-next-line react/display-name
87-
88-
68+
}
69+
// eslint-disable-next-line react/display-name
8970
function simple () {
9071
return /*#__PURE__*/jsxRuntime.jsx(File, {
9172
children: greetings('Test')
@@ -97,28 +78,20 @@ module.exports = simple;
9778
"
9879
`;
9980
100-
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;;;;"}"`;
10182
10283
exports[`Transpiler should transpile ES6 files with a simple setup and import correctly 1`] = `
10384
"'use strict';
10485
105-
var jsxRuntime = require('react/cjs/react-jsx-runtime.production.min');
10686
require('source-map-support/register');
10787
var path = require('path');
108-
109-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
110-
111-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
112-
113-
// eslint-disable-next-line security/detect-non-literal-require, no-undef
88+
var jsxRuntime = require('react/jsx-runtime');
11489
11590
const {
11691
File
117-
} = require(path__default[\\"default\\"].resolve(__dirname, '../../../../components'));
118-
119-
const greetings = name => \`hello \${name}\`; // eslint-disable-next-line react/display-name
120-
121-
92+
} = require(path.resolve(__dirname, '../../../../components'));
93+
const greetings = name => \`hello \${name}\`;
94+
// eslint-disable-next-line react/display-name
12295
function simple () {
12396
return /*#__PURE__*/jsxRuntime.jsx(File, {
12497
children: greetings('Test')
@@ -130,4 +103,4 @@ module.exports = simple;
130103
"
131104
`;
132105
133-
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;;;;"}"`;

src/transpiler/__tests__/transpiler.spec.tsx

+4-10
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,10 @@ describe('Transpiler', () => {
1313
const testFiles = path.resolve(__dirname, './testfiles');
1414
const outputFiles = path.resolve(__dirname, './__transpiled_testfiles');
1515

16-
beforeAll(async (done) => {
17-
try {
18-
await transpileFiles(testFiles, outputFiles, {
19-
recursive: true
20-
});
21-
done();
22-
} catch (e) {
23-
console.log(e);
24-
done(e);
25-
}
16+
beforeAll(async () => {
17+
await transpileFiles(testFiles, outputFiles, {
18+
recursive: true
19+
});
2620
});
2721

2822
describe('should transpile CommonJS files', () => {

src/transpiler/transpiler.ts

-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ export async function transpileFiles(directory: string, outputDir: string, optio
5151
sourcemap: true,
5252
dir: outputDir,
5353
exports: "auto",
54-
paths: {
55-
'react/jsx-runtime': 'react/cjs/react-jsx-runtime.production.min',
56-
},
5754
sanitizeFileName: false,
5855
})
5956
}

0 commit comments

Comments
 (0)