use directories for structure
This commit is contained in:
296
node_modules/acorn-private-class-elements/.eslintrc.json
generated
vendored
Normal file
296
node_modules/acorn-private-class-elements/.eslintrc.json
generated
vendored
Normal file
@@ -0,0 +1,296 @@
|
||||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": ["eslint:recommended", "plugin:node/recommended"],
|
||||
"plugins": ["node"],
|
||||
"rules": {
|
||||
"accessor-pairs": "error",
|
||||
"array-bracket-newline": "off",
|
||||
"array-bracket-spacing": "off",
|
||||
"array-callback-return": "error",
|
||||
"array-element-newline": "off",
|
||||
"arrow-body-style": "error",
|
||||
"arrow-parens": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": true
|
||||
}
|
||||
],
|
||||
"block-scoped-var": "error",
|
||||
"block-spacing": "off",
|
||||
"brace-style": [
|
||||
"error",
|
||||
"1tbs",
|
||||
{
|
||||
"allowSingleLine": true
|
||||
}
|
||||
],
|
||||
"callback-return": "error",
|
||||
"camelcase": "error",
|
||||
"capitalized-comments": "off",
|
||||
"class-methods-use-this": "error",
|
||||
"comma-dangle": "off",
|
||||
"comma-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": false
|
||||
}
|
||||
],
|
||||
"comma-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"complexity": "off",
|
||||
"computed-property-spacing": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"consistent-return": "error",
|
||||
"consistent-this": "error",
|
||||
"curly": [ "error", "multi-line" ],
|
||||
"default-case": "error",
|
||||
"dot-location": "error",
|
||||
"dot-notation": [
|
||||
"error",
|
||||
{
|
||||
"allowKeywords": true
|
||||
}
|
||||
],
|
||||
"eol-last": "error",
|
||||
"eqeqeq": "off",
|
||||
"for-direction": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-names": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"func-style": [
|
||||
"error",
|
||||
"declaration",
|
||||
{ "allowArrowFunctions": true }
|
||||
],
|
||||
"function-paren-newline": "off",
|
||||
"generator-star-spacing": "error",
|
||||
"getter-return": "error",
|
||||
"global-require": "warn",
|
||||
"guard-for-in": "error",
|
||||
"handle-callback-err": "error",
|
||||
"id-blacklist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"implicit-arrow-linebreak": [
|
||||
"error",
|
||||
"beside"
|
||||
],
|
||||
"indent": ["error", 2],
|
||||
"indent-legacy": "off",
|
||||
"init-declarations": "off",
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "error",
|
||||
"keyword-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": true
|
||||
}
|
||||
],
|
||||
"line-comment-position": "off",
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"lines-around-comment": "error",
|
||||
"lines-around-directive": "error",
|
||||
"lines-between-class-members": "error",
|
||||
"max-depth": "error",
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "off",
|
||||
"multiline-comment-style": [
|
||||
"error",
|
||||
"separate-lines"
|
||||
],
|
||||
"new-cap": "error",
|
||||
"new-parens": "error",
|
||||
"newline-after-var": "off",
|
||||
"newline-before-return": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"no-alert": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-await-in-loop": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-buffer-constructor": "error",
|
||||
"no-caller": "error",
|
||||
"no-catch-shadow": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-continue": "off",
|
||||
"no-div-regex": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-extra-parens": "off",
|
||||
"no-floating-decimal": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-inline-comments": "off",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-label-var": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-lonely-if": "off",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": "off",
|
||||
"no-mixed-operators": "off",
|
||||
"no-mixed-requires": "error",
|
||||
"no-multi-assign": "error",
|
||||
"no-multi-spaces": "error",
|
||||
"no-multi-str": "error",
|
||||
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }],
|
||||
"no-native-reassign": "error",
|
||||
"no-negated-condition": "off",
|
||||
"no-negated-in-lhs": "error",
|
||||
"no-nested-ternary": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-object": "error",
|
||||
"no-new-require": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-path-concat": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-proto": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-restricted-globals": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "error",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-spaced-func": "error",
|
||||
"no-sync": [
|
||||
"error",
|
||||
{
|
||||
"allowAtRootLevel": true
|
||||
}
|
||||
],
|
||||
"no-tabs": "error",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-ternary": "off",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
|
||||
"no-use-before-define": "error",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-var": "error",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "warn",
|
||||
"no-whitespace-before-property": "error",
|
||||
"no-with": "error",
|
||||
"nonblock-statement-body-position": [
|
||||
"error",
|
||||
"any"
|
||||
],
|
||||
"object-curly-newline": "off",
|
||||
"object-curly-spacing": "off",
|
||||
"object-property-newline": "off",
|
||||
"object-shorthand": "off",
|
||||
"one-var": "off",
|
||||
"one-var-declaration-per-line": "off",
|
||||
"operator-assignment": "error",
|
||||
"operator-linebreak": "error",
|
||||
"padded-blocks": "off",
|
||||
"padding-line-between-statements": "error",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-const": "off",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"prefer-reflect": "off",
|
||||
"prefer-rest-params": "off",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"quote-props": ["error", "as-needed"],
|
||||
"quotes": ["error", "double"],
|
||||
"radix": "error",
|
||||
"require-await": "error",
|
||||
"require-jsdoc": "off",
|
||||
"rest-spread-spacing": "error",
|
||||
"semi": ["error", "never"],
|
||||
"semi-spacing": "error",
|
||||
"semi-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"sort-imports": "error",
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "off",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "off",
|
||||
"strict": "error",
|
||||
"switch-colon-spacing": "error",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"valid-jsdoc": "error",
|
||||
"vars-on-top": "off",
|
||||
"wrap-regex": "error",
|
||||
"yield-star-spacing": "error",
|
||||
"yoda": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"node/no-unpublished-require": "off",
|
||||
"no-proto": "warn",
|
||||
"no-empty-function": "off"
|
||||
}
|
||||
}
|
26
node_modules/acorn-private-class-elements/CHANGELOG.md
generated
vendored
Normal file
26
node_modules/acorn-private-class-elements/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
## 0.2.5 (2020-04-23)
|
||||
|
||||
* Evaluate class heritage with outer private environment
|
||||
|
||||
## 0.2.4 (2020-04-22)
|
||||
|
||||
* Don't allow private element access on `super`
|
||||
|
||||
## 0.2.3 (2020-04-22)
|
||||
|
||||
(Skipped 0.2.1 and 0.2.2 because I accidentally called 0.2.0 0.2.2 in git)
|
||||
|
||||
* Use injected acorn instance if available
|
||||
* Uses `Object.getPrototypeOf` if available instead of `__proto__`
|
||||
|
||||
## 0.2.0 (2020-03-07)
|
||||
|
||||
* Mark as compatible with acorn v7
|
||||
|
||||
## 0.1.1 (2019-02-09)
|
||||
|
||||
* Add \_branch() method
|
||||
|
||||
## 0.1.0 (2019-02-09)
|
||||
|
||||
Initial release
|
19
node_modules/acorn-private-class-elements/LICENSE
generated
vendored
Normal file
19
node_modules/acorn-private-class-elements/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (C) 2017-2018 by Adrian Heine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
11
node_modules/acorn-private-class-elements/README.md
generated
vendored
Normal file
11
node_modules/acorn-private-class-elements/README.md
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Helpers for supporting private class methods and fields for Acorn
|
||||
|
||||
[](https://www.npmjs.org/package/acorn-private-class-elements)
|
||||
|
||||
This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
|
||||
|
||||
It provides helpers for implementing support for private class elements. The emitted AST follows [an ESTree proposal](https://github.com/estree/estree/pull/180).
|
||||
|
||||
## License
|
||||
|
||||
This plugin is released under an [MIT License](./LICENSE).
|
152
node_modules/acorn-private-class-elements/index.js
generated
vendored
Normal file
152
node_modules/acorn-private-class-elements/index.js
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
"use strict"
|
||||
|
||||
const getPrototype = Object.getPrototypeOf || (o => o.__proto__)
|
||||
|
||||
const getAcorn = Parser => {
|
||||
if (Parser.acorn) return Parser.acorn
|
||||
|
||||
const acorn = require("acorn")
|
||||
|
||||
if (acorn.version.indexOf("6.") != 0 && acorn.version.indexOf("6.0.") == 0 && acorn.version.indexOf("7.") != 0) {
|
||||
throw new Error(`acorn-private-class-elements requires acorn@^6.1.0 or acorn@7.0.0, not ${acorn.version}`)
|
||||
}
|
||||
|
||||
// Make sure `Parser` comes from the same acorn as we `require`d,
|
||||
// otherwise the comparisons fail.
|
||||
for (let cur = Parser; cur && cur !== acorn.Parser; cur = getPrototype(cur)) {
|
||||
if (cur !== acorn.Parser) {
|
||||
throw new Error("acorn-private-class-elements does not support mixing different acorn copies")
|
||||
}
|
||||
}
|
||||
return acorn
|
||||
}
|
||||
|
||||
module.exports = function(Parser) {
|
||||
// Only load this plugin once.
|
||||
if (Parser.prototype.parsePrivateName) {
|
||||
return Parser
|
||||
}
|
||||
|
||||
const acorn = getAcorn(Parser)
|
||||
|
||||
Parser = class extends Parser {
|
||||
_branch() {
|
||||
this.__branch = this.__branch || new Parser({ecmaVersion: this.options.ecmaVersion}, this.input)
|
||||
this.__branch.end = this.end
|
||||
this.__branch.pos = this.pos
|
||||
this.__branch.type = this.type
|
||||
this.__branch.value = this.value
|
||||
this.__branch.containsEsc = this.containsEsc
|
||||
return this.__branch
|
||||
}
|
||||
|
||||
parsePrivateClassElementName(element) {
|
||||
element.computed = false
|
||||
element.key = this.parsePrivateName()
|
||||
if (element.key.name == "constructor") this.raise(element.key.start, "Classes may not have a private element named constructor")
|
||||
const accept = {get: "set", set: "get"}[element.kind]
|
||||
const privateBoundNames = this._privateBoundNames
|
||||
if (Object.prototype.hasOwnProperty.call(privateBoundNames, element.key.name) && privateBoundNames[element.key.name] !== accept) {
|
||||
this.raise(element.start, "Duplicate private element")
|
||||
}
|
||||
privateBoundNames[element.key.name] = element.kind || true
|
||||
delete this._unresolvedPrivateNames[element.key.name]
|
||||
return element.key
|
||||
}
|
||||
|
||||
parsePrivateName() {
|
||||
const node = this.startNode()
|
||||
node.name = this.value
|
||||
this.next()
|
||||
this.finishNode(node, "PrivateName")
|
||||
if (this.options.allowReserved == "never") this.checkUnreserved(node)
|
||||
return node
|
||||
}
|
||||
|
||||
// Parse # token
|
||||
getTokenFromCode(code) {
|
||||
if (code === 35) {
|
||||
++this.pos
|
||||
const word = this.readWord1()
|
||||
return this.finishToken(this.privateNameToken, word)
|
||||
}
|
||||
return super.getTokenFromCode(code)
|
||||
}
|
||||
|
||||
// Manage stacks and check for undeclared private names
|
||||
parseClass(node, isStatement) {
|
||||
const oldOuterPrivateBoundNames = this._outerPrivateBoundNames
|
||||
this._outerPrivateBoundNames = this._privateBoundNames
|
||||
this._privateBoundNames = Object.create(this._privateBoundNames || null)
|
||||
const oldOuterUnresolvedPrivateNames = this._outerUnresolvedPrivateNames
|
||||
this._outerUnresolvedPrivateNames = this._unresolvedPrivateNames
|
||||
this._unresolvedPrivateNames = Object.create(null)
|
||||
|
||||
const _return = super.parseClass(node, isStatement)
|
||||
|
||||
const unresolvedPrivateNames = this._unresolvedPrivateNames
|
||||
this._privateBoundNames = this._outerPrivateBoundNames
|
||||
this._outerPrivateBoundNames = oldOuterPrivateBoundNames
|
||||
this._unresolvedPrivateNames = this._outerUnresolvedPrivateNames
|
||||
this._outerUnresolvedPrivateNames = oldOuterUnresolvedPrivateNames
|
||||
if (!this._unresolvedPrivateNames) {
|
||||
const names = Object.keys(unresolvedPrivateNames)
|
||||
if (names.length) {
|
||||
names.sort((n1, n2) => unresolvedPrivateNames[n1] - unresolvedPrivateNames[n2])
|
||||
this.raise(unresolvedPrivateNames[names[0]], "Usage of undeclared private name")
|
||||
}
|
||||
} else Object.assign(this._unresolvedPrivateNames, unresolvedPrivateNames)
|
||||
return _return
|
||||
}
|
||||
|
||||
// Class heritage is evaluated with outer private environment
|
||||
parseClassSuper(node) {
|
||||
const privateBoundNames = this._privateBoundNames
|
||||
this._privateBoundNames = this._outerPrivateBoundNames
|
||||
const unresolvedPrivateNames = this._unresolvedPrivateNames
|
||||
this._unresolvedPrivateNames = this._outerUnresolvedPrivateNames
|
||||
const _return = super.parseClassSuper(node)
|
||||
this._privateBoundNames = privateBoundNames
|
||||
this._unresolvedPrivateNames = unresolvedPrivateNames
|
||||
return _return
|
||||
}
|
||||
|
||||
// Parse private element access
|
||||
parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow) {
|
||||
if (!this.eat(acorn.tokTypes.dot)) {
|
||||
return super.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow)
|
||||
}
|
||||
let node = this.startNodeAt(startPos, startLoc)
|
||||
node.object = base
|
||||
node.computed = false
|
||||
if (this.type == this.privateNameToken) {
|
||||
if (base.type == "Super") {
|
||||
this.raise(this.start, "Cannot access private element on super")
|
||||
}
|
||||
node.property = this.parsePrivateName()
|
||||
if (!this._privateBoundNames || !this._privateBoundNames[node.property.name]) {
|
||||
if (!this._unresolvedPrivateNames) {
|
||||
this.raise(node.property.start, "Usage of undeclared private name")
|
||||
}
|
||||
this._unresolvedPrivateNames[node.property.name] = node.property.start
|
||||
}
|
||||
} else {
|
||||
node.property = this.parseIdent(true)
|
||||
}
|
||||
return this.finishNode(node, "MemberExpression")
|
||||
}
|
||||
|
||||
// Prohibit delete of private class elements
|
||||
parseMaybeUnary(refDestructuringErrors, sawUnary) {
|
||||
const _return = super.parseMaybeUnary(refDestructuringErrors, sawUnary)
|
||||
if (_return.operator == "delete") {
|
||||
if (_return.argument.type == "MemberExpression" && _return.argument.property.type == "PrivateName") {
|
||||
this.raise(_return.start, "Private elements may not be deleted")
|
||||
}
|
||||
}
|
||||
return _return
|
||||
}
|
||||
}
|
||||
Parser.prototype.privateNameToken = new acorn.TokenType("privateName")
|
||||
return Parser
|
||||
}
|
67
node_modules/acorn-private-class-elements/package.json
generated
vendored
Normal file
67
node_modules/acorn-private-class-elements/package.json
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"acorn-private-class-elements@0.2.5",
|
||||
"D:\\Projects\\siag\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "acorn-private-class-elements@0.2.5",
|
||||
"_id": "acorn-private-class-elements@0.2.5",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-3eApRrJmPjaxWB3XidP8YMeVq9pcswPFE0KsSWVuhceCU68ZS8fkcf0fTXGhCmnNd7n48NWWV27EKMFPeCoJLg==",
|
||||
"_location": "/acorn-private-class-elements",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "acorn-private-class-elements@0.2.5",
|
||||
"name": "acorn-private-class-elements",
|
||||
"escapedName": "acorn-private-class-elements",
|
||||
"rawSpec": "0.2.5",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.2.5"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/acorn-class-fields",
|
||||
"/acorn-private-methods",
|
||||
"/acorn-static-class-features"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/acorn-private-class-elements/-/acorn-private-class-elements-0.2.5.tgz",
|
||||
"_spec": "0.2.5",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed",
|
||||
"bugs": {
|
||||
"url": "https://github.com/acornjs/acorn-private-class-elements/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Adrian Heine",
|
||||
"email": "mail@adrianheine.de"
|
||||
}
|
||||
],
|
||||
"description": "Helpers for supporting private class methods and fields in acorn",
|
||||
"devDependencies": {
|
||||
"acorn": "^7.0.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-node": "^11.0.0",
|
||||
"mocha": "^7.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.8.2"
|
||||
},
|
||||
"homepage": "https://github.com/acornjs/acorn-private-class-elements",
|
||||
"license": "MIT",
|
||||
"name": "acorn-private-class-elements",
|
||||
"peerDependencies": {
|
||||
"acorn": "^6.1.0 || ^7.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/acornjs/acorn-private-class-elements.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint -c .eslintrc.json .",
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.2.5"
|
||||
}
|
5
node_modules/acorn-private-class-elements/test/.eslintrc.json
generated
vendored
Normal file
5
node_modules/acorn-private-class-elements/test/.eslintrc.json
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": {
|
||||
"mocha": true
|
||||
}
|
||||
}
|
15
node_modules/acorn-private-class-elements/test/test.js
generated
vendored
Normal file
15
node_modules/acorn-private-class-elements/test/test.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict"
|
||||
|
||||
const assert = require("assert")
|
||||
const acorn = require("acorn")
|
||||
const privateClassElements = require("..")
|
||||
|
||||
describe("acorn-private-class-elements", () => {
|
||||
it("does not inject itself twice", () => {
|
||||
const first = privateClassElements(acorn.Parser)
|
||||
assert.strictEqual(first, privateClassElements(first))
|
||||
})
|
||||
it("checks that the same acorn copy is used", () => {
|
||||
assert.throws(() => privateClassElements(function () {}))
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user