Skip to content

Commit

Permalink
Remove ts-jest, use babel (#439)
Browse files Browse the repository at this point in the history
* Remove ts-jest, use babel

* Fix ETE tests
  • Loading branch information
zachkirsch authored Jul 26, 2022
1 parent 1851bdf commit b365f6d
Show file tree
Hide file tree
Showing 181 changed files with 234 additions and 316 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
compile-and-test:
machine:
image: ubuntu-2004:current
resource_class: xlarge
steps:
- checkout
- node/install-packages:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getAllPackages } from "@fern-api/scripts";
import IS_CI from "is-ci";
// eslint-disable-next-line jest/no-jest-import
import { Config } from "jest";
import { getAllPackages } from "./packages/scripts/src/getAllPackages";
import defaultConfig from "./shared/jest.config.shared";

const ETE_TESTS_PACKAGE_NAME = "@fern-api/ete-tests";
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@
"jest": "^28.1.3",
"lint-staged": "^12.3.7",
"lodash": "^4.17.21",
"mrlint": "^0.0.61",
"mrlint": "^0.0.62",
"prettier": "^2.7.1",
"stylelint": "^14.9.1",
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard-scss": "^4.0.0",
"ts-jest": "^28.0.7",
"ts-node": "^10.8.0",
"typescript": "4.6.4"
},
"packageManager": "[email protected]"
Expand Down
1 change: 1 addition & 0 deletions packages/_root/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../babel.config.json");
1 change: 0 additions & 1 deletion packages/_root/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/_root/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/_root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/cli/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/cli/cli/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/cli/cli/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/cli/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"bin": {
"fern": "dist/bundle.cjs"
Expand Down
1 change: 1 addition & 0 deletions packages/cli/ete-tests/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/cli/ete-tests/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/cli/ete-tests/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/cli/ete-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
6 changes: 4 additions & 2 deletions packages/cli/ete-tests/src/__test__/utils/runFernCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import path from "path";

export async function runFernCli(args: string[], options?: Options): Promise<execa.ExecaChildProcess> {
const cmd = execa("node", [path.join(__dirname, "../../../../cli/dist/bundle.cjs"), ...args], options);
cmd.stdout?.pipe(process.stdout);
cmd.stderr?.pipe(process.stderr);
if (options?.reject !== false) {
cmd.stdout?.pipe(process.stdout);
cmd.stderr?.pipe(process.stderr);
}
return cmd;
}
1 change: 1 addition & 0 deletions packages/cli/login/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/cli/login/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/cli/login/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/cli/login/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/commons/core-utils/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/commons/core-utils/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/commons/core-utils/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/commons/core-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/commons/loadable/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/commons/loadable/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/commons/loadable/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/commons/loadable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/config-management/add-generator/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/config-management/add-generator/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/config-management/add-generator/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/config-management/add-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/config-management/init/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/config-management/init/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/config-management/init/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/config-management/init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/fern-typescript/cli/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/fern-typescript/cli/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/fern-typescript/cli/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/fern-typescript/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/fern-typescript/client/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/fern-typescript/client/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/fern-typescript/client/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/fern-typescript/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/fern-typescript/encoders/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/fern-typescript/encoders/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/fern-typescript/encoders/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/fern-typescript/encoders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/fern-typescript/errors/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/fern-typescript/errors/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/fern-typescript/errors/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/fern-typescript/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../babel.config.json");

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../shared/jest.config.shared";
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../../../babel.config.json");

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../../../shared/jest.config.shared";
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../../babel.config.json");

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../../shared/jest.config.shared";
3 changes: 2 additions & 1 deletion packages/fern-typescript/helpers/helper-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
1 change: 1 addition & 0 deletions packages/fern-typescript/helpers/utils/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../../babel.config.json");
1 change: 0 additions & 1 deletion packages/fern-typescript/helpers/utils/babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions packages/fern-typescript/helpers/utils/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import packageConfig from "../../../../shared/jest.config.shared";

export default packageConfig;
export { default } from "../../../../shared/jest.config.shared";
Loading

0 comments on commit b365f6d

Please sign in to comment.