mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
deps: update babel dependencies
This commit is contained in:
parent
4b711da2b2
commit
0e1172ea32
@ -16,86 +16,110 @@ function evaluate(fn, re, filename) {
|
||||
return inferAccess(re)(inferName(toComment(fn, filename)));
|
||||
}
|
||||
|
||||
test('inferAccess', function() {
|
||||
test('inferAccess', function () {
|
||||
expect(
|
||||
evaluate(function() {
|
||||
evaluate(function () {
|
||||
/** Test */
|
||||
function _name() {}
|
||||
}, '^_').access
|
||||
).toBe('private');
|
||||
|
||||
expect(
|
||||
evaluate(function() {
|
||||
evaluate(function () {
|
||||
/** @private */
|
||||
function name() {}
|
||||
}, '^_').access
|
||||
).toBe('private');
|
||||
|
||||
expect(
|
||||
evaluate(function() {
|
||||
evaluate(function () {
|
||||
/** @public */
|
||||
function _name() {}
|
||||
}, '^_').access
|
||||
).toBe('public');
|
||||
|
||||
expect(
|
||||
evaluate(function() {
|
||||
evaluate(function () {
|
||||
/** Test */
|
||||
function name_() {}
|
||||
}, '_$').access
|
||||
).toBe('private');
|
||||
|
||||
expect(
|
||||
evaluate(`
|
||||
evaluate(
|
||||
`
|
||||
class Test {
|
||||
/** */
|
||||
private foo() {}
|
||||
}
|
||||
`, '_$', 'test.ts').access
|
||||
`,
|
||||
'_$',
|
||||
'test.ts'
|
||||
).access
|
||||
).toBe('private');
|
||||
|
||||
expect(
|
||||
evaluate(`
|
||||
evaluate(
|
||||
`
|
||||
class Test {
|
||||
/** */
|
||||
protected foo() {}
|
||||
}
|
||||
`, '_$', 'test.ts').access
|
||||
`,
|
||||
'_$',
|
||||
'test.ts'
|
||||
).access
|
||||
).toBe('protected');
|
||||
|
||||
expect(
|
||||
evaluate(`
|
||||
evaluate(
|
||||
`
|
||||
class Test {
|
||||
/** */
|
||||
public foo() {}
|
||||
}
|
||||
`, '_$', 'test.ts').access
|
||||
`,
|
||||
'_$',
|
||||
'test.ts'
|
||||
).access
|
||||
).toBe('public');
|
||||
|
||||
expect(
|
||||
evaluate(`
|
||||
class Test {
|
||||
evaluate(
|
||||
`
|
||||
abstract class Test {
|
||||
/** */
|
||||
public abstract foo();
|
||||
}
|
||||
`, '_$', 'test.ts').access
|
||||
`,
|
||||
'_$',
|
||||
'test.ts'
|
||||
).access
|
||||
).toBe('public');
|
||||
|
||||
expect(
|
||||
evaluate(`
|
||||
evaluate(
|
||||
`
|
||||
class Test {
|
||||
/** */
|
||||
readonly name: string;
|
||||
}
|
||||
`, '_$', 'test.ts').readonly
|
||||
`,
|
||||
'_$',
|
||||
'test.ts'
|
||||
).readonly
|
||||
).toBe(true);
|
||||
|
||||
expect(
|
||||
evaluate(`
|
||||
evaluate(
|
||||
`
|
||||
interface Test {
|
||||
/** */
|
||||
readonly name: string;
|
||||
}
|
||||
`, '_$', 'test.ts').readonly
|
||||
`,
|
||||
'_$',
|
||||
'test.ts'
|
||||
).readonly
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
10
package.json
10
package.json
@ -8,11 +8,11 @@
|
||||
"documentation": "./bin/documentation.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/generator": "7.12.1",
|
||||
"@babel/parser": "7.12.3",
|
||||
"@babel/traverse": "^7.12.1",
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/core": "7.14.0",
|
||||
"@babel/generator": "7.14.1",
|
||||
"@babel/parser": "7.14.1",
|
||||
"@babel/traverse": "^7.14.0",
|
||||
"@babel/types": "^7.14.1",
|
||||
"ansi-html": "^0.0.7",
|
||||
"babelify": "^10.0.0",
|
||||
"chalk": "^2.3.0",
|
||||
|
||||
@ -7,12 +7,8 @@ const TYPESCRIPT_EXTS = {
|
||||
};
|
||||
|
||||
const standardBabelParserPlugins = [
|
||||
'classProperties',
|
||||
'classPrivateProperties',
|
||||
'classPrivateMethods',
|
||||
'doExpressions',
|
||||
'exportDefaultFrom',
|
||||
'exportExtensions',
|
||||
'functionBind',
|
||||
'partialApplication',
|
||||
['pipelineOperator', { proposal: 'minimal' }],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user