Skip to content

Commit c1c5748

Browse files
committed
2 parents 5dd5ece + 951f0ab commit c1c5748

File tree

3 files changed

+54
-49
lines changed

3 files changed

+54
-49
lines changed

package.json

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,64 +31,64 @@
3131
"author": "Jay V <air@live.ca>",
3232
"license": "MIT",
3333
"dependencies": {
34-
"@babel/core": "^7.13.10",
35-
"@babel/plugin-proposal-class-properties": "^7.13.0",
36-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13",
37-
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
38-
"@babel/plugin-transform-runtime": "^7.13.10",
39-
"@babel/preset-env": "^7.13.12",
40-
"@babel/runtime": "^7.13.10",
41-
"@typescript-eslint/eslint-plugin": "^4.22.0",
42-
"@typescript-eslint/parser": "^4.22.0",
34+
"@babel/core": "^7.17.2",
35+
"@babel/plugin-proposal-class-properties": "^7.16.7",
36+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
37+
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
38+
"@babel/plugin-transform-runtime": "^7.17.0",
39+
"@babel/preset-env": "^7.16.11",
40+
"@babel/runtime": "^7.17.2",
41+
"@typescript-eslint/eslint-plugin": "^4.33.0",
42+
"@typescript-eslint/parser": "^4.33.0",
4343
"babel-eslint": "^10.0.2",
44-
"babel-jest": "^26.5.2",
45-
"babel-loader": "^8.2.2",
46-
"babel-plugin-source-map-support": "^2.1.1",
47-
"chalk": "^4.1.0",
48-
"concat-text-webpack-plugin": "^0.1.9",
44+
"babel-jest": "^26.6.3",
45+
"babel-loader": "^8.2.3",
46+
"babel-plugin-source-map-support": "^2.1.3",
47+
"chalk": "^4.1.2",
48+
"concat-text-webpack-plugin": "^0.2.1",
4949
"copy-webpack-plugin": "^8.1.1",
50-
"core-js": "^3.10.1",
50+
"core-js": "^3.21.0",
5151
"cross-spawn": "^7.0.3",
52-
"css-loader": "^5.2.1",
53-
"dotenv": "^8.2.0",
54-
"esbuild-loader": "^2.12.0",
55-
"eslint": "^7.24.0",
52+
"css-loader": "^5.2.7",
53+
"dotenv": "^8.6.0",
54+
"esbuild-loader": "^2.18.0",
55+
"eslint": "^7.32.0",
5656
"eslint-config-strongloop": "^2.1.0",
57-
"eslint-webpack-plugin": "^2.5.3",
58-
"fast-glob": "^3.2.5",
59-
"fork-ts-checker-webpack-plugin": "^6.2.1",
60-
"graphql": "^15.5.0",
61-
"graphql-tag": "^2.10.3",
57+
"eslint-webpack-plugin": "^2.6.0",
58+
"fast-glob": "^3.2.11",
59+
"fork-ts-checker-webpack-plugin": "^6.5.0",
60+
"graphql": "^15.8.0",
61+
"graphql-tag": "^2.12.6",
6262
"ignore-loader": "^0.1.2",
6363
"import-fresh": "^3.3.0",
64-
"isomorphic-style-loader": "^5.1.0",
65-
"jest": "^26.5.3",
64+
"isomorphic-style-loader": "^5.3.2",
65+
"jest": "^26.6.3",
6666
"pkg-up": "^3.1.0",
67-
"raw-loader": "^4.0.1",
68-
"regenerator-runtime": "^0.13.2",
69-
"resolve": "^1.20.0",
70-
"sass": "^1.32.8",
71-
"sass-loader": "^11.0.1",
72-
"serverless-webpack": "^5.5.4",
73-
"source-map-support": "^0.5.19",
74-
"ts-jest": "^26.5.5",
75-
"ts-loader": "^8.1.0",
76-
"tsconfig-paths-webpack-plugin": "^3.5.1",
77-
"typescript": "^4.2.4",
78-
"webpack": "^5.33.2",
67+
"raw-loader": "^4.0.2",
68+
"regenerator-runtime": "^0.13.9",
69+
"resolve": "^1.22.0",
70+
"sass": "^1.49.7",
71+
"sass-loader": "^11.1.1",
72+
"serverless-webpack": "^5.6.1",
73+
"source-map-support": "^0.5.21",
74+
"ts-jest": "^26.5.6",
75+
"ts-loader": "^8.3.0",
76+
"tsconfig-paths-webpack-plugin": "^3.5.2",
77+
"typescript": "^4.5.5",
78+
"webpack": "^5.68.0",
7979
"webpack-bundle-analyzer": "^4.5.0",
8080
"webpack-node-externals": "^2.5.2",
8181
"webpack-permissions-plugin": "^1.0.8"
8282
},
8383
"devDependencies": {
84-
"@types/jest": "^26.0.22",
84+
"@types/jest": "^26.0.24",
8585
"husky": "^6.0.0",
86-
"is-ci": "^3.0.0",
86+
"is-ci": "^3.0.1",
8787
"lerna-changelog": "^1.0.1",
8888
"lint-staged": "^10.5.4",
89-
"prettier": "^2.2.1",
89+
"prettier": "^2.5.1",
9090
"reflect-metadata": "^0.1.13",
91-
"serverless": "^2.37.1"
91+
"serverless": "^2.72.2"
9292
},
9393
"peerDependencies": {
9494
"serverless": "1 || 2 || 3"

scripts/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function resolveJestDefaultEnvironment(name) {
5858
});
5959
}
6060
let cleanArgv = [];
61-
let env = "jsdom";
61+
let env = "node";
6262
let next;
6363
do {
6464
next = argv.shift();

src/webpack.config.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,21 @@ if (
7676
throw `ERROR: ${config.options.tsConfig} not found.`;
7777
}
7878

79+
const parsedTsConfig = parseTsConfig();
80+
7981
if (ENABLE_TYPESCRIPT && checkInvalidTsModule()) {
8082
console.log("serverless-bundle: CommonJS, ES3, or ES5 are not supported");
8183
}
8284

83-
function checkInvalidTsModule() {
85+
function parseTsConfig() {
8486
// Borrowed from
8587
// https://github.com/formium/tsdx/blob/e84e8d654c8462b8db65a3d395e2a4ba79bf1bd2/src/createRollupConfig.ts#L49-L55
8688
const tsConfigJSON = ts.readConfigFile(tsConfigPath, ts.sys.readFile).config;
87-
const tsCompilerOptions = ts.parseJsonConfigFileContent(
88-
tsConfigJSON,
89-
ts.sys,
90-
"./"
91-
).options;
89+
return ts.parseJsonConfigFileContent(tsConfigJSON, ts.sys, "./");
90+
}
91+
92+
function checkInvalidTsModule() {
93+
const tsCompilerOptions = parsedTsConfig.options;
9294

9395
const module = tsCompilerOptions.module;
9496
const target = tsCompilerOptions.target;
@@ -295,6 +297,9 @@ function plugins() {
295297
};
296298

297299
if (ENABLE_LINTING) {
300+
if (parsedTsConfig.exclude) {
301+
tsEslintConfig.ignorePatterns = parsedTsConfig.exclude
302+
}
298303
forkTsCheckerWebpackOptions.eslint = {
299304
files: path.join(servicePath, "**/*.ts"),
300305
options: { cwd: servicePath, baseConfig: tsEslintConfig },

0 commit comments

Comments
 (0)