Skip to content

Commit 4a5cbd6

Browse files
committed
feat: disable private-methods for typescript 4.3+
1 parent c5db41f commit 4a5cbd6

File tree

9 files changed

+1408
-2111
lines changed

9 files changed

+1408
-2111
lines changed

.versionrc

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

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ So that you can use babel to transform proposals which are current in stage 0-2
4444
7. [json-strings](https://www.npmjs.com/package/@babel/plugin-proposal-json-strings)
4545
8. [partial-application](https://www.npmjs.com/package/@babel/plugin-proposal-partial-application)
4646
9. [pipeline-operator](https://www.npmjs.com/package/@babel/plugin-proposal-pipeline-operator)
47-
10. [private-methods](https://www.npmjs.com/package/@babel/plugin-proposal-private-methods)
48-
11. [private-property-in-object](https://www.npmjs.com/package/@babel/plugin-proposal-private-property-in-object)
49-
12. [record-and-tuple](https://www.npmjs.com/package/@babel/plugin-proposal-record-and-tuple)
50-
13. [throw-expressions](https://www.npmjs.com/package/@babel/plugin-proposal-throw-expressions)
51-
14. [v8intrinsic](./src/v8intrinsic.ts) - [Further Detail](https://babeljs.io/blog/2019/09/05/7.6.0#v8-intrinsic-runtime-functions-parsing-10148-https-githubcom-babel-babel-pull-10148)
47+
10. [private-property-in-object](https://www.npmjs.com/package/@babel/plugin-proposal-private-property-in-object)
48+
11. [record-and-tuple](https://www.npmjs.com/package/@babel/plugin-proposal-record-and-tuple)
49+
12. [throw-expressions](https://www.npmjs.com/package/@babel/plugin-proposal-throw-expressions)
50+
13. [v8intrinsic](./src/v8intrinsic.ts) - [Further Detail](https://babeljs.io/blog/2019/09/05/7.6.0#v8-intrinsic-runtime-functions-parsing-10148-https-githubcom-babel-babel-pull-10148)
5251

5352
## Install
5453

package.json

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
"node": ">=6.9.0"
1010
},
1111
"main": "lib/cjs",
12-
"module": "lib",
12+
"module": "lib/esm",
1313
"es2015": "lib/es2015",
14-
"fesm5": "lib/esm",
1514
"types": "lib",
1615
"files": [
1716
"lib",
@@ -41,21 +40,20 @@
4140
},
4241
"peerDependencies": {
4342
"@babel/core": "^7.14.1",
44-
"typescript": "^4.0.0"
43+
"typescript": "^4.3.0"
4544
},
4645
"dependencies": {
4746
"@babel/helper-plugin-utils": "^7.13.0",
4847
"@babel/plugin-proposal-async-do-expressions": "^7.14.0",
4948
"@babel/plugin-proposal-class-properties": "^7.13.0",
50-
"@babel/plugin-proposal-class-static-block": "^7.13.11",
49+
"@babel/plugin-proposal-class-static-block": "^7.14.3",
5150
"@babel/plugin-proposal-do-expressions": "^7.14.0",
5251
"@babel/plugin-proposal-function-bind": "^7.12.13",
5352
"@babel/plugin-proposal-function-sent": "^7.12.13",
54-
"@babel/plugin-proposal-json-strings": "^7.13.8",
55-
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
53+
"@babel/plugin-proposal-json-strings": "^7.14.2",
54+
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
5655
"@babel/plugin-proposal-partial-application": "^7.12.13",
5756
"@babel/plugin-proposal-pipeline-operator": "^7.12.13",
58-
"@babel/plugin-proposal-private-methods": "^7.13.0",
5957
"@babel/plugin-proposal-private-property-in-object": "^7.14.0",
6058
"@babel/plugin-proposal-record-and-tuple": "^7.13.0",
6159
"@babel/plugin-proposal-throw-expressions": "^7.12.13",
@@ -65,18 +63,16 @@
6563
"compare-versions": "^3.6.0"
6664
},
6765
"devDependencies": {
68-
"@1stg/lib-config": "^1.2.10",
66+
"@1stg/lib-config": "^3.0.0",
6967
"@babel/eslint-plugin": "^7.13.16",
7068
"@changesets/changelog-github": "^0.4.0",
7169
"@changesets/cli": "^2.16.0",
7270
"@types/babel__core": "^7.1.14",
7371
"@types/jest": "^26.0.23",
74-
"babel-jest": "^26.6.3",
72+
"babel-jest": "^27.0.2",
7573
"clean-publish": "^2.2.0",
76-
"npm-run-all": "^4.1.5",
77-
"ts-node": "^9.1.1",
78-
"typescript": "^4.2.4",
79-
"yarn-deduplicate": "^3.1.0"
74+
"ts-node": "^10.0.0",
75+
"typescript": "^4.3.2"
8076
},
8177
"resolutions": {
8278
"babel-preset-proposal-typescript": "link:.",

src/index.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import proposalFunctionSent from '@babel/plugin-proposal-function-sent'
99
import proposalJsonStrings from '@babel/plugin-proposal-json-strings'
1010
import proposalPartialApplication from '@babel/plugin-proposal-partial-application'
1111
import proposalPipelineOperator from '@babel/plugin-proposal-pipeline-operator'
12-
import proposalPrivateMethods from '@babel/plugin-proposal-private-methods'
1312
import proposalPrivatePropertyInObject from '@babel/plugin-proposal-private-property-in-object'
1413
import proposalRecordAndTuple from '@babel/plugin-proposal-record-and-tuple'
1514
import proposalThrowExpression from '@babel/plugin-proposal-throw-expressions'
@@ -24,9 +23,9 @@ export interface ProposalTypeScriptOptions {
2423
decoratorsBeforeExport?: boolean
2524
decoratorsLegacy?: boolean
2625
isTSX?: boolean
27-
pipelineOperator?: 'minimal' | 'smart' | 'fsharp'
26+
pipelineOperator?: 'fsharp' | 'minimal' | 'smart'
2827
recordTuplePolyfill?: boolean | string
29-
recordTupleSyntaxType?: 'hash' | 'bar'
28+
recordTupleSyntaxType?: 'bar' | 'hash'
3029
}
3130

3231
export default declare(
@@ -83,12 +82,6 @@ export default declare(
8382
proposal: pipelineOperator,
8483
},
8584
],
86-
[
87-
proposalPrivateMethods,
88-
{
89-
loose: classLoose,
90-
},
91-
],
9285
[
9386
proposalPrivatePropertyInObject,
9487
{

test/__snapshots__/private-methods.spec.ts.snap

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

test/private-methods.spec.ts

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

test/private-methods.ts

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

tsconfig.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{
2-
"extends": "./node_modules/@1stg/tsconfig/lib",
3-
"ts-node": {
4-
"compilerOptions": {
5-
"module": "CommonJS"
6-
}
7-
}
2+
"extends": "@1stg/tsconfig/node"
83
}

0 commit comments

Comments
 (0)