Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update acorn to v8.0.4 #35791

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ The externally maintained libraries used by Node.js are:

- Acorn, located at deps/acorn, is licensed as follows:
"""
MIT License

Copyright (C) 2012-2018 by various contributors (see AUTHORS)

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
16 changes: 0 additions & 16 deletions deps/acorn-plugins/acorn-numeric-separator/CHANGELOG.md

This file was deleted.

19 changes: 0 additions & 19 deletions deps/acorn-plugins/acorn-numeric-separator/LICENSE

This file was deleted.

21 changes: 0 additions & 21 deletions deps/acorn-plugins/acorn-numeric-separator/README.md

This file was deleted.

49 changes: 0 additions & 49 deletions deps/acorn-plugins/acorn-numeric-separator/index.js

This file was deleted.

33 changes: 0 additions & 33 deletions deps/acorn-plugins/acorn-numeric-separator/package.json

This file was deleted.

16 changes: 16 additions & 0 deletions deps/acorn/acorn-walk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 8.0.0 (2020-08-12)

### New features

The package can now be loaded directly as an ECMAScript module in node 13+.

## 7.2.0 (2020-06-17)

### New features

Support optional chaining and nullish coalescing.

Support `import.meta`.

Add support for `export * as ns from "source"`.

## 7.1.1 (2020-02-13)

### Bug fixes
Expand Down
2 changes: 2 additions & 0 deletions deps/acorn/acorn-walk/LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
MIT License

Copyright (C) 2012-2018 by various contributors (see AUTHORS)

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
112 changes: 112 additions & 0 deletions deps/acorn/acorn-walk/dist/walk.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import {Node} from 'acorn';

declare module "acorn-walk" {
type FullWalkerCallback<TState> = (
node: Node,
state: TState,
type: string
) => void;

type FullAncestorWalkerCallback<TState> = (
node: Node,
state: TState | Node[],
ancestors: Node[],
type: string
) => void;
type WalkerCallback<TState> = (node: Node, state: TState) => void;

type SimpleWalkerFn<TState> = (
node: Node,
state: TState
) => void;

type AncestorWalkerFn<TState> = (
node: Node,
state: TState| Node[],
ancestors: Node[]
) => void;

type RecursiveWalkerFn<TState> = (
node: Node,
state: TState,
callback: WalkerCallback<TState>
) => void;

type SimpleVisitors<TState> = {
[type: string]: SimpleWalkerFn<TState>
};

type AncestorVisitors<TState> = {
[type: string]: AncestorWalkerFn<TState>
};

type RecursiveVisitors<TState> = {
[type: string]: RecursiveWalkerFn<TState>
};

type FindPredicate = (type: string, node: Node) => boolean;

interface Found<TState> {
node: Node,
state: TState
}

export function simple<TState>(
node: Node,
visitors: SimpleVisitors<TState>,
base?: RecursiveVisitors<TState>,
state?: TState
): void;

export function ancestor<TState>(
node: Node,
visitors: AncestorVisitors<TState>,
base?: RecursiveVisitors<TState>,
state?: TState
): void;

export function recursive<TState>(
node: Node,
state: TState,
functions: RecursiveVisitors<TState>,
base?: RecursiveVisitors<TState>
): void;

export function full<TState>(
node: Node,
callback: FullWalkerCallback<TState>,
base?: RecursiveVisitors<TState>,
state?: TState
): void;

export function fullAncestor<TState>(
node: Node,
callback: FullAncestorWalkerCallback<TState>,
base?: RecursiveVisitors<TState>,
state?: TState
): void;

export function make<TState>(
functions: RecursiveVisitors<TState>,
base?: RecursiveVisitors<TState>
): RecursiveVisitors<TState>;

export function findNodeAt<TState>(
node: Node,
start: number | undefined,
end?: number | undefined,
type?: FindPredicate | string,
base?: RecursiveVisitors<TState>,
state?: TState
): Found<TState> | undefined;

export function findNodeAround<TState>(
node: Node,
start: number | undefined,
type?: FindPredicate | string,
base?: RecursiveVisitors<TState>,
state?: TState
): Found<TState> | undefined;

export const findNodeAfter: typeof findNodeAround;
}
8 changes: 5 additions & 3 deletions deps/acorn/acorn-walk/dist/walk.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {})));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';

// AST walker module for Mozilla Parser API compatible trees

Expand Down Expand Up @@ -200,7 +200,7 @@
};
base.Statement = skipThrough;
base.EmptyStatement = ignore;
base.ExpressionStatement = base.ParenthesizedExpression =
base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression =
function (node, st, c) { return c(node.expression, st, "Expression"); };
base.IfStatement = function (node, st, c) {
c(node.test, st, "Expression");
Expand Down Expand Up @@ -405,6 +405,8 @@
if (node.source) { c(node.source, st, "Expression"); }
};
base.ExportAllDeclaration = function (node, st, c) {
if (node.exported)
{ c(node.exported, st); }
c(node.source, st, "Expression");
};
base.ImportDeclaration = function (node, st, c) {
Expand Down Expand Up @@ -458,4 +460,4 @@

Object.defineProperty(exports, '__esModule', { value: true });

}));
})));
1 change: 1 addition & 0 deletions deps/acorn/acorn-walk/dist/walk.js.map

Large diffs are not rendered by default.

Loading