Skip to content

Commit

Permalink
new: Enable optional chaining, nullish coalescing, and more (#13)
Browse files Browse the repository at this point in the history
* Update babel deps.

* Update TS dep.

* Enable plugins in Babel.

* Enable useDefineForClassFields.

* Add deps.
  • Loading branch information
milesj authored Nov 6, 2019
1 parent 08d914c commit 3e26bdb
Show file tree
Hide file tree
Showing 11 changed files with 383 additions and 340 deletions.
2 changes: 2 additions & 0 deletions packages/config-babel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ exports.getConfig = function getConfig({
plugins.push(
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-optional-catch-binding',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
);
}

Expand Down
14 changes: 8 additions & 6 deletions packages/config-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
},
"dependencies": {
"@airbnb/nimbus-common": "^2.0.1",
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.0",
"@babel/plugin-proposal-class-properties": "^7.7.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-optional-catch-binding": "^7.2.0",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/plugin-transform-react-jsx-self": "^7.2.0",
"@babel/plugin-transform-react-jsx-source": "^7.5.0",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.6.3",
"@babel/preset-react": "^7.6.3",
"@babel/preset-typescript": "^7.6.0",
"@babel/preset-env": "^7.7.1",
"@babel/preset-react": "^7.7.0",
"@babel/preset-typescript": "^7.7.0",
"@beemo/core": "^1.0.7",
"@beemo/driver-babel": "^1.0.5",
"babel-plugin-graphql-tag": "^2.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/config-danger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"access": "public"
},
"devDependencies": {
"@types/node": "^12.7.7"
"@types/node": "^12.12.5"
},
"dependencies": {
"conventional-changelog-beemo": "^1.5.1",
"danger": "^9.2.2"
"danger": "^9.2.4"
}
}
4 changes: 2 additions & 2 deletions packages/config-eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@airbnb/nimbus-common": "^2.0.1",
"@beemo/core": "^1.0.7",
"@beemo/driver-eslint": "^1.0.6",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"@typescript-eslint/parser": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@typescript-eslint/parser": "^2.6.1",
"babel-eslint": "^10.0.3",
"eslint": "^6.6.0",
"eslint-config-airbnb": "^18.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/config-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@airbnb/nimbus-common": "^2.0.1",
"@babel/core": "^7.6.4",
"@babel/core": "^7.7.0",
"@beemo/core": "^1.0.7",
"@beemo/driver-babel": "^1.0.5",
"@beemo/driver-jest": "^1.0.4",
Expand Down
3 changes: 3 additions & 0 deletions packages/config-typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ exports.getCompilerOptions = function getCompilerOptions({
removeComments: false,
strict: true,
target: next || node ? 'es2018' : 'es2015',
// Use define in development for spec accuracy,
// but omit in production for smaller file sizes.
useDefineForClassFields: next && process.env.NODE_ENV === 'development',
};

if (react) {
Expand Down
2 changes: 1 addition & 1 deletion packages/config-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"dependencies": {
"@beemo/core": "^1.0.7",
"@beemo/driver-typescript": "^1.1.4",
"typescript": "^3.6.4"
"typescript": "^3.7.2"
}
}
4 changes: 2 additions & 2 deletions packages/config-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@airbnb/nimbus-common": "^2.0.1",
"@babel/core": "^7.6.4",
"@babel/core": "^7.7.0",
"@beemo/core": "^1.0.7",
"@beemo/driver-webpack": "^1.0.6",
"babel-loader": "^8.0.6",
Expand All @@ -36,7 +36,7 @@
"url-loader": "^2.2.0",
"webpack": "^4.41.2",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "3.3.9",
"webpack-cli": "3.3.10",
"webpack-dev-server": "^3.9.0",
"webpack-graphql-loader": "^1.0.2"
}
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"removeComments": false,
"strict": true,
"target": "es2018",
"useDefineForClassFields": false,
"outDir": "./lib"
},
"include": [
Expand Down
1 change: 1 addition & 0 deletions tsconfig.options.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"removeComments": false,
"strict": true,
"target": "es2018",
"useDefineForClassFields": false,
"composite": true,
"declarationMap": true
}
Expand Down
Loading

0 comments on commit 3e26bdb

Please sign in to comment.