Skip to content

Commit b29ece8

Browse files
authored
Merge pull request #1 from carlosms/upgrade
Upgrade dependencies to fix vulnerabilities
2 parents 6a8ae17 + eb34f0b commit b29ece8

File tree

8 files changed

+6226
-3298
lines changed

8 files changed

+6226
-3298
lines changed

images.d.ts

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

package.json

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,33 @@
2121
"dependencies": {
2222
"react": "^16.3.2",
2323
"react-dom": "^16.3.2",
24-
"react-scripts-ts": "2.16.0",
25-
"vscode": "^1.1.17"
24+
"terser": "3.16.0",
25+
"vscode": "^1.1.17"
26+
},
27+
"resolutions": {
28+
"terser": "3.14.1"
2629
},
2730
"scripts": {
28-
"vscode:prepublish": "react-scripts-ts build && tsc -p tsconfig.extension.json",
31+
"vscode:prepublish": "./scripts/build-non-split.js && tsc -p tsconfig.extension.json",
2932
"postinstall": "node ./node_modules/vscode/bin/install",
30-
"start": "react-scripts-ts start",
31-
"build": "react-scripts-ts build && tsc -p tsconfig.extension.json",
32-
"test": "react-scripts-ts test --env=jsdom",
33-
"eject": "react-scripts-ts eject"
33+
"start": "react-scripts start",
34+
"build": "./scripts/build-non-split.js && tsc -p tsconfig.extension.json",
35+
"test": "react-scripts test --env=jsdom",
36+
"eject": "react-scripts eject"
3437
},
3538
"devDependencies": {
36-
"@types/jest": "^22.2.3",
37-
"@types/node": "^10.1.2",
38-
"typescript": "^2.8.3",
39+
"@types/jest": "^23.3.13",
40+
"@types/node": "^10.1.2",
3941
"@types/react": "^16.3.14",
40-
"@types/react-dom": "^16.0.5"
41-
}
42+
"@types/react-dom": "^16.0.5",
43+
"react-scripts": "^2.1.3",
44+
"rewire": "^4.0.1",
45+
"typescript": "^3.3.1"
46+
},
47+
"browserslist": [
48+
">0.2%",
49+
"not dead",
50+
"not ie <= 11",
51+
"not op_mini all"
52+
]
4253
}

scripts/build-non-split.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env node
2+
3+
// Disables code splitting into chunks
4+
// See https://github.com/facebook/create-react-app/issues/5306#issuecomment-433425838
5+
6+
const rewire = require("rewire");
7+
const defaults = rewire("react-scripts/scripts/build.js");
8+
let config = defaults.__get__("config");
9+
10+
config.optimization.splitChunks = {
11+
cacheGroups: {
12+
default: false
13+
}
14+
};
15+
16+
config.optimization.runtimeChunk = false;

src/react-app-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="react-scripts" />

tsconfig.json

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
11
{
22
"compilerOptions": {
3-
"baseUrl": ".",
4-
"outDir": "build/dist",
5-
"module": "esnext",
63
"target": "es5",
7-
"lib": ["es6", "dom"],
8-
"sourceMap": true,
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
99
"allowJs": true,
10-
"jsx": "react",
11-
"moduleResolution": "node",
12-
"rootDir": "src",
10+
"skipLibCheck": true,
11+
"esModuleInterop": true,
12+
"allowSyntheticDefaultImports": true,
13+
"strict": true,
1314
"forceConsistentCasingInFileNames": true,
14-
"noImplicitReturns": true,
15-
"noImplicitThis": true,
16-
"noImplicitAny": true,
17-
"strictNullChecks": true,
18-
"suppressImplicitAnyIndexErrors": true,
19-
"noUnusedLocals": true
15+
"module": "esnext",
16+
"moduleResolution": "node",
17+
"resolveJsonModule": true,
18+
"isolatedModules": true,
19+
"noEmit": true,
20+
"jsx": "preserve"
2021
},
21-
"exclude": [
22-
"node_modules",
23-
"build",
24-
"scripts",
25-
"acceptance-tests",
26-
"webpack",
27-
"jest",
28-
"src/setupTests.ts",
29-
".vscode-test"
22+
"include": [
23+
"src"
3024
]
3125
}

tsconfig.prod.json

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

tsconfig.test.json

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

0 commit comments

Comments
 (0)