Skip to content

Commit e46a9ea

Browse files
saihajtwof
authored andcommitted
TS Migration: enable tests and remove flow infra (graphql#3091)
1 parent 8cfe3e3 commit e46a9ea

File tree

6 files changed

+34
-0
lines changed

6 files changed

+34
-0
lines changed

.babelrc-deno.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"plugins": [
3+
<<<<<<< HEAD
34
"@babel/plugin-syntax-typescript",
5+
=======
6+
"@babel/plugin-transform-typescript",
7+
>>>>>>> TS Migration: enable tests and remove flow infra (#3091)
48
["./resources/add-extension-to-import-paths", { "extension": "ts" }],
59
"./resources/inline-invariant"
610
]

package-lock.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
"changelog": "node resources/gen-changelog.js",
3131
"benchmark": "node benchmark/benchmark.js",
3232
"test": "npm run lint && npm run check && npm run testonly && npm run prettier:check && npm run check:spelling && npm run check:integrations",
33+
<<<<<<< HEAD
3334
"lint": "eslint --cache --max-warnings 0 .",
35+
=======
36+
"lint": "eslint --cache .",
37+
>>>>>>> TS Migration: enable tests and remove flow infra (#3091)
3438
"check": "tsc --pretty",
3539
"testonly": "mocha --full-trace src/**/__tests__/**/*-test.ts",
3640
"testonly:cover": "nyc npm run testonly",
@@ -46,7 +50,10 @@
4650
"devDependencies": {
4751
"@babel/core": "7.14.0",
4852
"@babel/eslint-parser": "7.13.14",
53+
<<<<<<< HEAD
4954
"@babel/plugin-syntax-typescript": "7.12.13",
55+
=======
56+
>>>>>>> TS Migration: enable tests and remove flow infra (#3091)
5057
"@babel/plugin-transform-typescript": "7.13.0",
5158
"@babel/preset-env": "7.14.1",
5259
"@babel/register": "7.13.16",

resources/build-deno.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ if (require.main === module) {
2222
const destPath = path.join('./denoDist', filepath);
2323

2424
fs.mkdirSync(path.dirname(destPath), { recursive: true });
25+
<<<<<<< HEAD
2526
if (filepath.endsWith('.ts')) {
27+
=======
28+
if (filepath.endsWith('.ts') && !filepath.endsWith('.d.ts')) {
29+
>>>>>>> TS Migration: enable tests and remove flow infra (#3091)
2630
const options = { babelrc: false, configFile: './.babelrc-deno.json' };
2731
const output = babel.transformFileSync(srcPath, options).code + '\n';
2832
writeGeneratedFile(destPath, output);

resources/build-npm.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,21 @@ if (require.main === module) {
2424
const destPath = path.join('./npmDist', filepath);
2525

2626
fs.mkdirSync(path.dirname(destPath), { recursive: true });
27+
<<<<<<< HEAD
2728
if (filepath.endsWith('.ts')) {
29+
=======
30+
if (filepath.endsWith('.ts') && !filepath.endsWith('.d.ts')) {
31+
>>>>>>> TS Migration: enable tests and remove flow infra (#3091)
2832
const cjs = babelBuild(srcPath, { envName: 'cjs' });
2933
writeGeneratedFile(destPath.replace(/\.ts$/, '.js'), cjs);
3034

3135
const mjs = babelBuild(srcPath, { envName: 'mjs' });
3236
writeGeneratedFile(destPath.replace(/\.ts$/, '.mjs'), mjs);
37+
<<<<<<< HEAD
38+
=======
39+
} else if (filepath.endsWith('.d.ts')) {
40+
fs.copyFileSync(srcPath, destPath);
41+
>>>>>>> TS Migration: enable tests and remove flow infra (#3091)
3342
}
3443
}
3544

tsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
"module": "commonjs",
55
"lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
66
"target": "es2019",
7+
<<<<<<< HEAD
78
"strict": true,
9+
=======
10+
"noImplicitAny": true,
11+
"noImplicitThis": true,
12+
"strictNullChecks": true,
13+
"strictFunctionTypes": true,
14+
>>>>>>> TS Migration: enable tests and remove flow infra (#3091)
815
"noEmit": true,
916
"forceConsistentCasingInFileNames": true
1017
}

0 commit comments

Comments
 (0)