Skip to content

Commit 7850473

Browse files
authored
Remove babel config (#6)
remove babel
1 parent b541226 commit 7850473

File tree

16 files changed

+4080
-6633
lines changed

16 files changed

+4080
-6633
lines changed

.babelrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545
name: cxAST.log
4646
path: cxAST.log
4747
retention-days: 30
48-
48+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
node_modules
2+
coverage
3+
tmp
4+
dist

babel.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

jest.config.bkup.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
testEnvironment: 'jest-environment-node',
3+
transform: {}
4+
};

jest.config.js

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,66 @@
1+
const NO_COVERAGE = process.env.NO_COVERAGE === '1';
2+
const CLEAR_CONSOLE = process.env.CLEAR_CONSOLE === '1';
3+
4+
const notice = () => console.log('Using Jest config from `jest.config.js`');
5+
6+
if (CLEAR_CONSOLE) {
7+
require('clear')();
8+
console.log();
9+
notice();
10+
console.log('Clearing console due to CLEAR_CONSOLE=1');
11+
} else {
12+
notice();
13+
}
14+
15+
if (NO_COVERAGE) {
16+
console.log('Coverage not collected due to NO_COVERAGE=1');
17+
}
18+
19+
console.log('Type checking is disabled during Jest for performance reasons, use `jest typecheck` when necessary.');
20+
121
module.exports = {
2-
"testMatch": [
3-
"**/.tests./**/*.+(ts|tsx)",
4-
"**/?(*.)+(spec|test).+(ts|tsx)"
5-
],
6-
setupFilesAfterEnv: ['./jest.setup.js']
7-
};
22+
rootDir: __dirname,
23+
roots: ['<rootDir>'],
24+
cache: true,
25+
verbose: true,
26+
cacheDirectory: '<rootDir>/tmp/jest',
27+
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
28+
// preset configs
29+
// preset: 'ts-jest/presets/js-with-ts',
30+
// which files to test and which to ignore
31+
testMatch: ['**/src/tests/*.test.(ts|tsx)'],
32+
testPathIgnorePatterns: ['/node_modules/', '/tmp/', '/coverage/', '/stories/', '/\\.storybook/'],
33+
// don't watch for file changes in node_modules
34+
watchPathIgnorePatterns: ['/node_modules/'],
35+
// jest automock settings
36+
automock: false,
37+
unmockedModulePathPatterns: ['/node_modules/'],
38+
setupFilesAfterEnv: ['./jest.setup.js'],
39+
// test environment setup
40+
// setupFiles: [`${__dirname}/setup/setup.js`],
41+
// setupFilesAfterEnv: [`${__dirname}/setup/setupAfterEnv.ts`],
42+
// coverage settings
43+
collectCoverage: NO_COVERAGE === false,
44+
collectCoverageFrom: NO_COVERAGE ? [] : ['**/*.{ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
45+
coveragePathIgnorePatterns: ['/node_modules/', '\\.json$', '/__tests__/', '/stories/', '/\\.storybook/'],
46+
47+
globals: {
48+
'ts-jest': {
49+
tsConfig: `${__dirname}/tsconfig.json`,
50+
51+
// https://huafu.github.io/ts-jest/user/config/diagnostics
52+
diagnostics: false,
53+
54+
// Makes jest test run much faster, BUT, without type checking.
55+
// Type checking in CI is done with `tsc --noEmit` or `yarn typecheck` command.
56+
// https://huafu.github.io/ts-jest/user/config/isolatedModules
57+
isolatedModules: true,
58+
},
59+
},
60+
61+
transformIgnorePatterns: ['/node_modules/(?!(lodash-es|antd|[^/]+/es|rc-animate|rc-util)/).*'],
62+
transform: {
63+
'\\.(ts|tsx)$': 'ts-jest',
64+
'/node_modules/((lodash-es|[^/]+/es)|rc-animate|rc-util)/.*': 'ts-jest',
65+
},
66+
};

jest.setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
jest.setTimeout(1000000);
1+
jest.setTimeout(1000000); // in milliseconds

package-bkup-0.0.17.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "@CheckmarxDev/ast-cli-javascript-wrapper",
3+
"version": "0.0.17",
4+
"description": "AST CLI Javascript wrapper",
5+
"main": "dist/CxAuth.js",
6+
"typings": "dist/CxAuth.d.ts",
7+
"jest": {
8+
"verbose": true,
9+
"transform": {},
10+
"testEnvironment": "jest-environment-jsdom-sixteen"
11+
},
12+
"type": "module",
13+
"files": [
14+
"dist/main/resources/cx*",
15+
"dist/main/*.ts",
16+
"dist/main/*.js",
17+
"dist/main/*.map",
18+
"babel.config.js",
19+
"jest.config.js",
20+
"jest.setup.js",
21+
"README.md"
22+
],
23+
"dependencies": {
24+
"typescript-logging": "^1.0.0",
25+
"log4js": "6.3.0",
26+
"tslog": "3.2.0"
27+
},
28+
"scripts": {
29+
"build": "tsc",
30+
"postbuild": "copyfiles -u 1 src/main/resources/cx* dist/",
31+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
32+
},
33+
"repository": "https://github.com/CheckmarxDev/ast-cli-javascript-wrapper.git",
34+
"author": "Jay Nanduri",
35+
"license": "ISC",
36+
"bugs": {
37+
"url": "https://github.com/CheckmarxDev/ast-cli-javascript-wrapper/issues"
38+
},
39+
"homepage": "https://github.com/CheckmarxDev/ast-cli-javascript-wrapper#readme",
40+
"devDependencies": {
41+
"@types/jest": "^26.0.24",
42+
"copyfiles": "^2.4.1",
43+
"jest": "^27.0.6",
44+
"jest-extended": "^0.11.5",
45+
"ts-jest": "^26.5.6",
46+
"jest-environment-jsdom-sixteen": "^1.0.3",
47+
"jest-environment-node": "^26.1.0"
48+
},
49+
"publishConfig": {
50+
"registry": "https://npm.pkg.github.com"
51+
}
52+
}

package-bkup.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "@CheckmarxDev/ast-cli-javascript-wrapper",
3+
"version": "0.0.16",
4+
"description": "AST CLI Javascript wrapper",
5+
"main": "dist/CxAuth.js",
6+
"typings": "dist/CxAuth.d.ts",
7+
"jest": {
8+
"verbose": true
9+
},
10+
"type": "commonjs",
11+
"files": [
12+
"dist/main/resources/cx*",
13+
"dist/main/*.ts",
14+
"dist/main/*.js",
15+
"dist/main/*.map",
16+
"babel.config.js",
17+
"jest.config.js",
18+
"jest.setup.js",
19+
"README.md"
20+
],
21+
"dependencies": {
22+
"typescript-logging": "^1.0.0",
23+
"log4js": "6.3.0",
24+
"tslog": "3.2.0"
25+
},
26+
"scripts": {
27+
"build": "tsc",
28+
"postbuild": "copyfiles -u 1 src/main/resources/cx* dist/",
29+
"test": "jest -i --silent=false"
30+
},
31+
"repository": "https://github.com/CheckmarxDev/ast-cli-javascript-wrapper.git",
32+
"author": "Jay Nanduri",
33+
"license": "ISC",
34+
"bugs": {
35+
"url": "https://github.com/CheckmarxDev/ast-cli-javascript-wrapper/issues"
36+
},
37+
"homepage": "https://github.com/CheckmarxDev/ast-cli-javascript-wrapper#readme",
38+
"devDependencies": {
39+
// "@babel/plugin-proposal-class-properties": "^7.14.5",
40+
// "@babel/preset-env": "^7.14.2",
41+
// "@babel/preset-typescript": "^7.13.0",
42+
// "@babel/runtime": "7.14.8",
43+
// "@types/jest": "^26.0.23",
44+
// "@types/node": "^15.6.1",
45+
// "babel-core": "^6.26.0",
46+
// "babel-jest": "^27.0.1",
47+
// "babel-plugin-transform-regenerator": "^6.26.0",
48+
// "babel-polyfill": "^6.26.0",
49+
// "babel-preset-es2015": "^6.0.15",
50+
// "babel-preset-stage-0": "^6.0.15",
51+
"copyfiles": "^2.4.1",
52+
"jest": "^27.0.6",
53+
"ts-jest": "^26.5.6",
54+
"babel-jest" : "27.0.6"
55+
// "@babel/core": "^7.14.8",
56+
// "@babel/cli": "^7.14.8",
57+
// "babel-loader": "^8.2.2",
58+
// "babel-plugin-lodash": "^3.3.2",
59+
// "babel-plugin-react-transform": "^3.0.0",
60+
// "@babel/preset-react": "^7.14.5"
61+
},
62+
"publishConfig": {
63+
"registry": "https://npm.pkg.github.com"
64+
}
65+
}

0 commit comments

Comments
 (0)