@runeditrun/rer 0.2.83 → 0.2.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -24
- package/cli/README.md +17 -1
- package/cli/authoring.mjs +1 -0
- package/cli/bounded.mjs +1 -1
- package/cli/business/carry.mjs +149 -0
- package/cli/business/command.mjs +6 -1
- package/cli/business/connect.mjs +1 -1
- package/cli/business/local-commands.mjs +2 -0
- package/cli/business/opt-ins.mjs +8 -4
- package/cli/business/questions.mjs +4 -1
- package/cli/business/state.mjs +1 -1
- package/cli/business/supervisor.mjs +7 -1
- package/cli/container-transfer.mjs +2 -2
- package/cli/contract.mjs +7 -7
- package/cli/demo-host.mjs +5 -1
- package/cli/demo-native.mjs +2 -1
- package/cli/demo.mjs +6 -1
- package/cli/deploy-command.mjs +6 -4
- package/cli/deploy.mjs +9 -7
- package/cli/errors.mjs +1 -1
- package/cli/export.mjs +1 -1
- package/cli/human-error.mjs +20 -0
- package/cli/lifecycle.mjs +23 -5
- package/cli/main.mjs +1 -1
- package/cli/managed-data-schema.mjs +114 -0
- package/cli/managed-data-zip.mjs +116 -0
- package/cli/managed-data.mjs +110 -0
- package/cli/managed-server.mjs +25 -14
- package/cli/native-owner-entry.mjs +86 -0
- package/cli/output.mjs +3 -2
- package/cli/parse.mjs +3 -3
- package/cli/portability-empty.mjs +59 -0
- package/cli/portability-migrations.mjs +7 -5
- package/cli/portability-policy.mjs +5 -2
- package/cli/portability-worker.mjs +15 -6
- package/cli/portability.mjs +30 -8
- package/cli/ready-summary.mjs +9 -0
- package/cli/run-transfers.mjs +37 -0
- package/cli/runtime-front-door.mjs +4 -4
- package/cli/server-proxy.mjs +4 -3
- package/cli/server-registry.mjs +13 -8
- package/cli/site.mjs +6 -1
- package/cli/transfers.mjs +17 -4
- package/edition-authoring/base-copies.mjs +125 -30
- package/edition-authoring/copy-checkout.mjs +7 -120
- package/edition-authoring/edition-migrations.mjs +41 -0
- package/edition-authoring/files.mjs +67 -0
- package/edition-authoring/lock.mjs +2 -2
- package/edition-authoring/module-closure.mjs +232 -0
- package/edition-authoring/module-edges.mjs +100 -0
- package/edition-authoring/module-resolution.mjs +66 -0
- package/edition-authoring/module-syntax.mjs +57 -0
- package/edition-authoring/package-target.mjs +92 -0
- package/edition-authoring/runtime-dependencies.mjs +74 -97
- package/edition-authoring/vendor/babel-parser/LICENSE +22 -0
- package/edition-authoring/vendor/babel-parser/README.md +21 -0
- package/edition-authoring/vendor/babel-parser/babel-helper-string-parser/index.mjs +292 -0
- package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/identifier.mjs +66 -0
- package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/index.mjs +13 -0
- package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/keyword.mjs +31 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/index.mjs +99 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/options.mjs +81 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/bind-operator-errors.mjs +8 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/module-errors.mjs +15 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/parse-expression-errors.mjs +10 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/pipeline-operator-errors.mjs +29 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/standard-errors.mjs +224 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/strict-mode-errors.mjs +17 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/to-node-description.mjs +31 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error.mjs +114 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/base.mjs +34 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/comments.mjs +199 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/expression.mjs +1794 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/index.mjs +76 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/lval.mjs +439 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/node.mjs +111 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/statement.mjs +1962 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/util.mjs +244 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugin-utils.mjs +116 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/estree.mjs +417 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/flow/index.mjs +2412 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/flow/scope.mjs +37 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/jsx/index.mjs +420 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/jsx/xhtml.mjs +261 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/placeholders.mjs +205 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/typescript/index.mjs +2889 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/typescript/scope.mjs +115 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/v8intrinsic.mjs +26 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/context.mjs +22 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/index.mjs +1037 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/state.mjs +178 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/types.mjs +583 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/types.mjs +1 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/class-scope.mjs +82 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/expression-scope.mjs +121 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/identifier.mjs +23 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/location.mjs +34 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/production-parameter.mjs +40 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/scope.mjs +173 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/scopeflags.mjs +66 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/whitespace.mjs +61 -0
- package/edition-authoring/vendor/yaml/LICENSE +13 -0
- package/edition-authoring/vendor/yaml/README.md +11 -0
- package/edition-authoring/vendor/yaml/compose/compose-collection.mjs +88 -0
- package/edition-authoring/vendor/yaml/compose/compose-doc.mjs +43 -0
- package/edition-authoring/vendor/yaml/compose/compose-node.mjs +110 -0
- package/edition-authoring/vendor/yaml/compose/compose-scalar.mjs +86 -0
- package/edition-authoring/vendor/yaml/compose/composer.mjs +218 -0
- package/edition-authoring/vendor/yaml/compose/resolve-block-map.mjs +115 -0
- package/edition-authoring/vendor/yaml/compose/resolve-block-scalar.mjs +198 -0
- package/edition-authoring/vendor/yaml/compose/resolve-block-seq.mjs +49 -0
- package/edition-authoring/vendor/yaml/compose/resolve-end.mjs +37 -0
- package/edition-authoring/vendor/yaml/compose/resolve-flow-collection.mjs +207 -0
- package/edition-authoring/vendor/yaml/compose/resolve-flow-scalar.mjs +228 -0
- package/edition-authoring/vendor/yaml/compose/resolve-props.mjs +148 -0
- package/edition-authoring/vendor/yaml/compose/util-contains-newline.mjs +34 -0
- package/edition-authoring/vendor/yaml/compose/util-empty-scalar-position.mjs +27 -0
- package/edition-authoring/vendor/yaml/compose/util-flow-indent-check.mjs +15 -0
- package/edition-authoring/vendor/yaml/compose/util-map-includes.mjs +13 -0
- package/edition-authoring/vendor/yaml/doc/Document.mjs +333 -0
- package/edition-authoring/vendor/yaml/doc/anchors.mjs +74 -0
- package/edition-authoring/vendor/yaml/doc/applyReviver.mjs +54 -0
- package/edition-authoring/vendor/yaml/doc/createNode.mjs +88 -0
- package/edition-authoring/vendor/yaml/doc/directives.mjs +176 -0
- package/edition-authoring/vendor/yaml/errors.mjs +57 -0
- package/edition-authoring/vendor/yaml/index.mjs +17 -0
- package/edition-authoring/vendor/yaml/log.mjs +11 -0
- package/edition-authoring/vendor/yaml/nodes/Alias.mjs +119 -0
- package/edition-authoring/vendor/yaml/nodes/Collection.mjs +147 -0
- package/edition-authoring/vendor/yaml/nodes/Node.mjs +38 -0
- package/edition-authoring/vendor/yaml/nodes/Pair.mjs +36 -0
- package/edition-authoring/vendor/yaml/nodes/Scalar.mjs +24 -0
- package/edition-authoring/vendor/yaml/nodes/YAMLMap.mjs +144 -0
- package/edition-authoring/vendor/yaml/nodes/YAMLSeq.mjs +113 -0
- package/edition-authoring/vendor/yaml/nodes/addPairToJSMap.mjs +62 -0
- package/edition-authoring/vendor/yaml/nodes/identity.mjs +36 -0
- package/edition-authoring/vendor/yaml/nodes/toJS.mjs +35 -0
- package/edition-authoring/vendor/yaml/parse/cst-scalar.mjs +214 -0
- package/edition-authoring/vendor/yaml/parse/cst-stringify.mjs +61 -0
- package/edition-authoring/vendor/yaml/parse/cst-visit.mjs +97 -0
- package/edition-authoring/vendor/yaml/parse/cst.mjs +98 -0
- package/edition-authoring/vendor/yaml/parse/lexer.mjs +722 -0
- package/edition-authoring/vendor/yaml/parse/line-counter.mjs +39 -0
- package/edition-authoring/vendor/yaml/parse/parser.mjs +975 -0
- package/edition-authoring/vendor/yaml/public-api.mjs +102 -0
- package/edition-authoring/vendor/yaml/schema/Schema.mjs +37 -0
- package/edition-authoring/vendor/yaml/schema/common/map.mjs +17 -0
- package/edition-authoring/vendor/yaml/schema/common/null.mjs +15 -0
- package/edition-authoring/vendor/yaml/schema/common/seq.mjs +17 -0
- package/edition-authoring/vendor/yaml/schema/common/string.mjs +14 -0
- package/edition-authoring/vendor/yaml/schema/core/bool.mjs +19 -0
- package/edition-authoring/vendor/yaml/schema/core/float.mjs +43 -0
- package/edition-authoring/vendor/yaml/schema/core/int.mjs +38 -0
- package/edition-authoring/vendor/yaml/schema/core/schema.mjs +23 -0
- package/edition-authoring/vendor/yaml/schema/json/schema.mjs +62 -0
- package/edition-authoring/vendor/yaml/schema/tags.mjs +96 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/binary.mjs +59 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/bool.mjs +26 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/float.mjs +46 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/int.mjs +71 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/merge.mjs +67 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/omap.mjs +74 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/pairs.mjs +78 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/schema.mjs +39 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/set.mjs +93 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/timestamp.mjs +101 -0
- package/edition-authoring/vendor/yaml/stringify/foldFlowLines.mjs +146 -0
- package/edition-authoring/vendor/yaml/stringify/stringify.mjs +130 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyCollection.mjs +155 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyComment.mjs +20 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyDocument.mjs +85 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyNumber.mjs +25 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyPair.mjs +150 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyString.mjs +338 -0
- package/edition-authoring/vendor/yaml/util.mjs +11 -0
- package/edition-authoring/vendor/yaml/visit.mjs +233 -0
- package/edition-authoring/workflow-copies.mjs +125 -0
- package/edition-authoring/workflow-scripts.mjs +112 -0
- package/foundation/runtime/contract-docs.mjs +754 -0
- package/foundation/runtime/run-data.d.mts +1 -0
- package/foundation/runtime/run-data.mjs +2 -0
- package/global/CHANGELOG.md +55 -3
- package/global/README.md +21 -24
- package/global/cli/command.mjs +8 -2
- package/global/cli/install.mjs +4 -5
- package/global/cli/path-link.mjs +3 -2
- package/global/cli/repo-command.mjs +3 -7
- package/global/launch/dev.mjs +12 -2
- package/global/launch/facts.mjs +2 -2
- package/global/launch/render.mjs +16 -9
- package/global/launch/state.mjs +4 -4
- package/global/main.mjs +12 -7
- package/install.sh +17 -6
- package/modules/container/README.md +6 -1
- package/modules/container/adapters/d1-limits.mjs +286 -0
- package/modules/container/adapters/d1-sqlite.mjs +95 -0
- package/modules/container/adapters/d1-workerd-preload.mjs +19 -0
- package/modules/container/adapters/d1-workerd-setup.mjs +26 -0
- package/modules/container/adapters/d1-workerd.mjs +5 -0
- package/modules/container/adapters/sqlite-worker.mjs +5 -3
- package/modules/container/build.mjs +1 -0
- package/modules/container/image-variables.mjs +8 -3
- package/modules/container/transfer.mjs +14 -4
- package/modules/container/worker-engine.mjs +3 -3
- package/modules/demo/declaration.mjs +1 -4
- package/modules/demo/vite.mjs +1 -1
- package/modules/demo-host/build.mjs +1 -0
- package/modules/demo-host/native/prepare.mjs +2 -1
- package/modules/demo-host/native/sql.mjs +7 -2
- package/modules/deploy-kit/README.md +23 -3
- package/modules/deploy-kit/d1-import-diagnostics.mjs +56 -0
- package/modules/deploy-kit/d1-import.mjs +17 -5
- package/modules/deploy-kit/diagnostics.mjs +29 -3
- package/modules/deploy-kit/owner-cli.mjs +20 -7
- package/modules/deploy-kit/provider-transport.mjs +19 -4
- package/modules/deploy-kit/provider.mjs +57 -22
- package/modules/deploy-kit/readiness-window.mjs +1 -1
- package/modules/deploy-kit/site.mjs +8 -3
- package/modules/deploy-kit/templates.mjs +3 -3
- package/modules/deploy-kit/worker.mjs +4 -4
- package/modules/import-kit/src/d1/README.md +23 -4
- package/modules/import-kit/src/d1/atomic-prefix.ts +2 -2
- package/modules/import-kit/src/d1/budget.ts +15 -7
- package/modules/import-kit/src/d1/column-layout.ts +5 -0
- package/modules/import-kit/src/d1/creation.ts +15 -8
- package/modules/import-kit/src/d1/database.ts +3 -3
- package/modules/import-kit/src/d1/erasure-pages.ts +2 -1
- package/modules/import-kit/src/d1/erasure.ts +2 -2
- package/modules/import-kit/src/d1/jobs.ts +10 -6
- package/modules/import-kit/src/d1/plans.ts +14 -8
- package/modules/import-kit/src/d1/retirement.ts +2 -2
- package/modules/import-kit/src/d1/sets.ts +1 -3
- package/modules/import-kit/src/d1/staged-creation.ts +3 -3
- package/modules/import-kit/src/door/limits.ts +1 -1
- package/modules/import-kit/src/door/refusals.ts +1 -1
- package/modules/portability/README.md +112 -4
- package/modules/portability/backfills.mjs +9 -8
- package/modules/portability/bridge.mjs +12 -5
- package/modules/portability/catalogue.mjs +12 -5
- package/modules/portability/files.mjs +4 -3
- package/modules/portability/http.mjs +3 -3
- package/modules/portability/import.mjs +18 -9
- package/modules/portability/index.d.mts +4 -3
- package/modules/portability/index.mjs +1 -1
- package/modules/portability/ledgers.mjs +3 -2
- package/modules/portability/legacy-safety.mjs +11 -2
- package/modules/portability/migration-history.mjs +2 -2
- package/modules/portability/progress.mjs +1 -0
- package/modules/portability/restore-empty.mjs +12 -0
- package/modules/release/github-verify.mjs +11 -2
- package/onboarding/adapter.mjs +35 -6
- package/onboarding/app-fetch.mjs +6 -4
- package/onboarding/development-runtime.mjs +19 -0
- package/onboarding/local/operation.mjs +45 -27
- package/onboarding/loopback-fetch.mjs +16 -0
- package/onboarding/operator-installer.mjs +4 -6
- package/onboarding/process-diagnostics.mjs +6 -2
- package/onboarding/production-runtime.mjs +4 -2
- package/onboarding/readiness.mjs +1 -0
- package/package.json +1 -1
- package/scripts/publish-check/README.md +6 -0
- package/scripts/publish-check/history_scan.py +5 -3
- package/scripts/publish-check/hygiene_config.py +2 -1
- package/scripts/publish-check/public_hygiene.py +1 -1
- package/scripts/publish-check/report.py +9 -3
- package/scripts/publish-check/third-party-notices.json +13 -0
- package/scripts/publish-check/third_party_notices.py +38 -0
- package/scripts/publish-check/tree_scan.py +6 -0
- package/scripts/publish-check.mjs +1 -1
|
@@ -1,108 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import path from 'node:path';
|
|
1
|
+
import {tokens, unquote} from './module-syntax.mjs';
|
|
2
|
+
import {canonical} from './module-resolution.mjs';
|
|
3
|
+
export {resolve, external} from './module-resolution.mjs';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
const code = /\.(?:[cm]?[jt]s|[jt]sx)$/;
|
|
8
|
-
const inside = (name, prefix) => name === prefix || name.startsWith(prefix + '/');
|
|
9
|
-
const mapped = (name, from, to) => to + name.slice(from.length);
|
|
5
|
+
export {dependencies} from './module-edges.mjs';
|
|
10
6
|
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
7
|
+
// Binding checks are lexical: unknown export forms remain unknown, never absent.
|
|
8
|
+
export function bindings(source, types = false) {
|
|
9
|
+
const t = tokens(source), result = new Map();
|
|
10
|
+
for (let i = 0; i < t.length; i++) {
|
|
11
|
+
if (!['import', 'export'].includes(t[i]) || ['.', '('].includes(t[i + 1])) continue;
|
|
12
|
+
let end = i + 1;
|
|
13
|
+
while (end < t.length && ![';', 'import', 'export'].includes(t[end]) && t[end] !== 'from') end++;
|
|
14
|
+
if (t[end] !== 'from') continue;
|
|
15
|
+
const specifier = canonical(unquote(t[end + 1]));
|
|
16
|
+
if (!specifier) continue;
|
|
17
|
+
const names = new Set(result.get(specifier) ?? []);
|
|
18
|
+
let start = i + 1;
|
|
19
|
+
const declarationType = t[start] === 'type' && start + 1 < end && t[start + 1] !== ',';
|
|
20
|
+
if (declarationType) start++;
|
|
21
|
+
if (declarationType === types && t[i] === 'import' && /^[\w$]+$/.test(t[start] ?? '') && t[start] !== 'from') names.add('default');
|
|
22
|
+
const open = t.indexOf('{', start);
|
|
23
|
+
if (open >= 0 && open < end) for (let j = open + 1; j < end && t[j] !== '}'; j++) {
|
|
24
|
+
if (t[j] === ',') continue;
|
|
25
|
+
const inlineType = t[j] === 'type' && /^[\w$]+$/.test(t[j + 1] ?? '') && t[j + 1] !== 'as';
|
|
26
|
+
if (inlineType) j++;
|
|
27
|
+
if ((declarationType || inlineType) === types) names.add(unquote(t[j]) ?? t[j]);
|
|
28
|
+
if (t[j + 1] === 'as') j += 2;
|
|
30
29
|
}
|
|
31
|
-
|
|
30
|
+
result.set(specifier, names);
|
|
32
31
|
}
|
|
33
32
|
return result;
|
|
34
33
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
checkTarget(target);
|
|
62
|
-
let plan = plans.find(plan => inside(target, plan.copy.path));
|
|
63
|
-
if (plan && mapped(target, plan.copy.path, plan.copy.originPath) !== source) throw Error(`Runtime dependency ${target} conflicts with its Base copy mapping`);
|
|
64
|
-
// A missing recorded file is a removal, not an omitted sibling. Restoring
|
|
65
|
-
// it here would bypass refresh's retirement/removal plan and could leave
|
|
66
|
-
// the recreated source outside its record. Refuse before any writes.
|
|
67
|
-
if (plan?.removed.includes(target)) throw Error(`Runtime dependency ${target} was removed locally but is still imported; no files were refreshed. Restore it or adapt the importing module before refreshing.`);
|
|
68
|
-
if (plan?.copy.adapted?.[target]) {
|
|
69
|
-
queue.push({source, target, baseline});
|
|
70
|
-
return; // Keep seed bytes while supplying the shipped module's dependencies.
|
|
71
|
-
}
|
|
72
|
-
if (!plan?.sources.some(([name]) => name === source)) {
|
|
73
|
-
const actual = local(target);
|
|
74
|
-
const previous = actual && read.tree(baseline).get(source);
|
|
75
|
-
const previousDigest = previous && read.digests([previous.object]).get(previous.object);
|
|
76
|
-
if (actual && actual !== upstream.get(tree.get(source).object) && actual !== previousDigest) {
|
|
77
|
-
// Existing unrecorded siblings belong to the seed, just as in the
|
|
78
|
-
// ordinary copy selection. They already satisfy this import's presence;
|
|
79
|
-
// only an absent sibling needs to be supplied by Base. Keep traversing
|
|
80
|
-
// the shipped graph so a later adoption cannot omit its dependencies.
|
|
81
|
-
// Recorded edits and acknowledgements were checked before planning.
|
|
82
|
-
queue.push({source, target, baseline});
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (!plan) {
|
|
86
|
-
if (plans.some(plan => inside(plan.copy.path, target))) throw Error(`Runtime dependency ${target} overlaps an existing Base copy`);
|
|
87
|
-
plan = {copy: {path: target, originPath: source, revision, files: {}, modes: {}}, sources: [], removed: []};
|
|
88
|
-
plans.push(plan);
|
|
34
|
+
export function lexicalExports(source, star, types = false) {
|
|
35
|
+
const t = tokens(source), names = new Set();
|
|
36
|
+
for (let i = 0; i < t.length; i++) {
|
|
37
|
+
if (t[i] !== 'export') continue;
|
|
38
|
+
let j = i + 1;
|
|
39
|
+
if (t[j] === 'default') { if (types || !['interface', 'type'].includes(t[j + 1])) names.add('default'); continue; }
|
|
40
|
+
const declared = t[j] === 'declare';
|
|
41
|
+
if (declared) j++;
|
|
42
|
+
if (t[j] === 'async') j++;
|
|
43
|
+
if (['const', 'let', 'var'].includes(t[j]) && ['{', '['].includes(t[j + 1])) return null;
|
|
44
|
+
if (['const', 'let', 'var', 'function', 'class', 'interface', 'type', 'enum', 'namespace'].includes(t[j]) && t[j + 1] !== '{') {
|
|
45
|
+
if (!types && (declared || ['interface', 'type'].includes(t[j]))) continue;
|
|
46
|
+
const name = t[j] === 'function' && t[j + 1] === '*' ? t[j + 2] : t[j + 1];
|
|
47
|
+
if (!/^[\w$]+$/.test(name ?? '')) return null;
|
|
48
|
+
names.add(name);
|
|
49
|
+
if (['const', 'let', 'var'].includes(t[j])) {
|
|
50
|
+
let depth = 0;
|
|
51
|
+
for (let k = j + 2; k < t.length; k++) {
|
|
52
|
+
if (!depth && [';', 'export', 'import'].includes(t[k])) break;
|
|
53
|
+
if (['(', '[', '{'].includes(t[k])) depth++;
|
|
54
|
+
if ([')', ']', '}'].includes(t[k])) depth--;
|
|
55
|
+
if (!depth && t[k] === ',') {
|
|
56
|
+
if (!/^[\w$]+$/.test(t[k + 1] ?? '') || !['=', ':'].includes(t[k + 2])) return null;
|
|
57
|
+
names.add(t[k + 1]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
89
60
|
}
|
|
90
|
-
|
|
91
|
-
plan.removed = plan.removed.filter(name => name !== target);
|
|
61
|
+
continue;
|
|
92
62
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
63
|
+
const declarationType = t[j] === 'type';
|
|
64
|
+
if (declarationType) {
|
|
65
|
+
if (!types) continue;
|
|
66
|
+
j++;
|
|
67
|
+
}
|
|
68
|
+
if (t[j] === '*') {
|
|
69
|
+
if (t[j + 1] === 'as') { names.add(t[j + 2]); continue; }
|
|
70
|
+
const specifier = unquote(t[j + 2]);
|
|
71
|
+
if (!specifier?.startsWith('.')) return null;
|
|
72
|
+
const inherited = star(specifier);
|
|
73
|
+
if (inherited === null) return null;
|
|
74
|
+
for (const name of inherited) if (name !== 'default') names.add(name);
|
|
75
|
+
}
|
|
76
|
+
if (t[j] === '{') for (j++; j < t.length && t[j] !== '}'; j++) {
|
|
77
|
+
if (t[j] === ',') continue;
|
|
78
|
+
const inlineType = t[j] === 'type' && /^[\w$]+$/.test(t[j + 1] ?? '') && t[j + 1] !== 'as';
|
|
79
|
+
if (inlineType) { j++; if (!types) { if (t[j + 1] === 'as') j += 2; continue; } }
|
|
80
|
+
if (t[j + 1] === 'as') { names.add(unquote(t[j + 2]) ?? t[j + 2]); j += 2; }
|
|
81
|
+
else names.add(unquote(t[j]) ?? t[j]);
|
|
103
82
|
}
|
|
104
|
-
// JS type imports also need the declaration file used by edition typechecks.
|
|
105
|
-
const declaration = source.replace(/\.mjs$/, '.d.mts').replace(/\.cjs$/, '.d.cts');
|
|
106
|
-
if (declaration !== source && tree.has(declaration)) include(declaration, target.replace(/\.mjs$/, '.d.mts').replace(/\.cjs$/, '.d.cts'), baseline);
|
|
107
83
|
}
|
|
84
|
+
return names;
|
|
108
85
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Babel parser 7.29.8 and its string/identifier helpers (MIT; LICENSE).
|
|
2
|
+
Source: https://github.com/babel/babel/tree/v7.29.8/packages/babel-parser/src
|
|
3
|
+
Helpers: packages/babel-helper-string-parser/src and
|
|
4
|
+
packages/babel-helper-validator-identifier/src in that same release.
|
|
5
|
+
|
|
6
|
+
The 45 upstream TypeScript modules retain their source boundaries as explicit
|
|
7
|
+
.mjs modules. Compilation uses @babel/core and @babel/preset-typescript 7.29.7,
|
|
8
|
+
onlyRemoveTypeImports and optimizeConstEnums, the release's official bit-decorator
|
|
9
|
+
plugin and babel-plugin-transform-charcodes 0.2.1. Babel 7 production flags are
|
|
10
|
+
folded (BABEL_8_BREAKING=false, IS_PUBLISH=true, NODE_ENV=production), then esbuild
|
|
11
|
+
emits Node 22 ESM. Relative imports and the two helper-package imports point to
|
|
12
|
+
these local modules. No runtime package installation is required.
|
|
13
|
+
|
|
14
|
+
The source files were checked against the Git blob identifiers in the official
|
|
15
|
+
v7.29.8 tree. Compiled ASTs were compared with the published @babel/parser 7.29.8
|
|
16
|
+
for JavaScript, optional calls, templates, TypeScript and TSX. Parser behavior is
|
|
17
|
+
unchanged; runtime dependency policy is in ../../module-edges.mjs.
|
|
18
|
+
|
|
19
|
+
Grammar fallthrough and empty-probe comments are restored for linting. Narrow
|
|
20
|
+
inline unused-binding annotations preserve upstream parser method/callback
|
|
21
|
+
interfaces. These annotations apply only to the generated upstream modules.
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
// Generated from Babel v7.29.8 (MIT); see README.md.
|
|
2
|
+
var _isDigit = function isDigit(code) {
|
|
3
|
+
return code >= 48 && code <= 57;
|
|
4
|
+
};
|
|
5
|
+
const forbiddenNumericSeparatorSiblings = {
|
|
6
|
+
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
7
|
+
hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
|
|
8
|
+
};
|
|
9
|
+
const isAllowedNumericSeparatorSibling = {
|
|
10
|
+
bin: (ch) => ch === 48 || ch === 49,
|
|
11
|
+
oct: (ch) => ch >= 48 && ch <= 55,
|
|
12
|
+
dec: (ch) => ch >= 48 && ch <= 57,
|
|
13
|
+
hex: (ch) => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
|
|
14
|
+
};
|
|
15
|
+
function readStringContents(type, input, pos, lineStart, curLine, errors) {
|
|
16
|
+
const initialPos = pos;
|
|
17
|
+
const initialLineStart = lineStart;
|
|
18
|
+
const initialCurLine = curLine;
|
|
19
|
+
let out = "";
|
|
20
|
+
let firstInvalidLoc = null;
|
|
21
|
+
let chunkStart = pos;
|
|
22
|
+
const {
|
|
23
|
+
length
|
|
24
|
+
} = input;
|
|
25
|
+
for (; ; ) {
|
|
26
|
+
if (pos >= length) {
|
|
27
|
+
errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
|
28
|
+
out += input.slice(chunkStart, pos);
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
const ch = input.charCodeAt(pos);
|
|
32
|
+
if (isStringEnd(type, ch, input, pos)) {
|
|
33
|
+
out += input.slice(chunkStart, pos);
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
if (ch === 92) {
|
|
37
|
+
out += input.slice(chunkStart, pos);
|
|
38
|
+
const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
|
|
39
|
+
if (res.ch === null && !firstInvalidLoc) {
|
|
40
|
+
firstInvalidLoc = {
|
|
41
|
+
pos,
|
|
42
|
+
lineStart,
|
|
43
|
+
curLine
|
|
44
|
+
};
|
|
45
|
+
} else {
|
|
46
|
+
out += res.ch;
|
|
47
|
+
}
|
|
48
|
+
({
|
|
49
|
+
pos,
|
|
50
|
+
lineStart,
|
|
51
|
+
curLine
|
|
52
|
+
} = res);
|
|
53
|
+
chunkStart = pos;
|
|
54
|
+
} else if (ch === 8232 || ch === 8233) {
|
|
55
|
+
++pos;
|
|
56
|
+
++curLine;
|
|
57
|
+
lineStart = pos;
|
|
58
|
+
} else if (ch === 10 || ch === 13) {
|
|
59
|
+
if (type === "template") {
|
|
60
|
+
out += input.slice(chunkStart, pos) + "\n";
|
|
61
|
+
++pos;
|
|
62
|
+
if (ch === 13 && input.charCodeAt(pos) === 10) {
|
|
63
|
+
++pos;
|
|
64
|
+
}
|
|
65
|
+
++curLine;
|
|
66
|
+
chunkStart = lineStart = pos;
|
|
67
|
+
} else {
|
|
68
|
+
errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
|
69
|
+
}
|
|
70
|
+
} else {
|
|
71
|
+
++pos;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
pos,
|
|
76
|
+
str: out,
|
|
77
|
+
firstInvalidLoc,
|
|
78
|
+
lineStart,
|
|
79
|
+
curLine,
|
|
80
|
+
containsInvalid: !!firstInvalidLoc
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function isStringEnd(type, ch, input, pos) {
|
|
84
|
+
if (type === "template") {
|
|
85
|
+
return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
|
|
86
|
+
}
|
|
87
|
+
return ch === (type === "double" ? 34 : 39);
|
|
88
|
+
}
|
|
89
|
+
function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
|
|
90
|
+
const throwOnInvalid = !inTemplate;
|
|
91
|
+
pos++;
|
|
92
|
+
const res = (ch2) => ({
|
|
93
|
+
pos,
|
|
94
|
+
ch: ch2,
|
|
95
|
+
lineStart,
|
|
96
|
+
curLine
|
|
97
|
+
});
|
|
98
|
+
const ch = input.charCodeAt(pos++);
|
|
99
|
+
switch (ch) {
|
|
100
|
+
case 110:
|
|
101
|
+
return res("\n");
|
|
102
|
+
case 114:
|
|
103
|
+
return res("\r");
|
|
104
|
+
case 120: {
|
|
105
|
+
let code;
|
|
106
|
+
({
|
|
107
|
+
code,
|
|
108
|
+
pos
|
|
109
|
+
} = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
|
|
110
|
+
return res(code === null ? null : String.fromCharCode(code));
|
|
111
|
+
}
|
|
112
|
+
case 117: {
|
|
113
|
+
let code;
|
|
114
|
+
({
|
|
115
|
+
code,
|
|
116
|
+
pos
|
|
117
|
+
} = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
|
|
118
|
+
return res(code === null ? null : String.fromCodePoint(code));
|
|
119
|
+
}
|
|
120
|
+
case 116:
|
|
121
|
+
return res(" ");
|
|
122
|
+
case 98:
|
|
123
|
+
return res("\b");
|
|
124
|
+
case 118:
|
|
125
|
+
return res("\v");
|
|
126
|
+
case 102:
|
|
127
|
+
return res("\f");
|
|
128
|
+
case 13:
|
|
129
|
+
if (input.charCodeAt(pos) === 10) {
|
|
130
|
+
++pos;
|
|
131
|
+
}
|
|
132
|
+
// falls through (upstream parser grammar)
|
|
133
|
+
case 10:
|
|
134
|
+
lineStart = pos;
|
|
135
|
+
++curLine;
|
|
136
|
+
// falls through (upstream parser grammar)
|
|
137
|
+
case 8232:
|
|
138
|
+
case 8233:
|
|
139
|
+
return res("");
|
|
140
|
+
case 56:
|
|
141
|
+
case 57:
|
|
142
|
+
if (inTemplate) {
|
|
143
|
+
return res(null);
|
|
144
|
+
} else {
|
|
145
|
+
errors.strictNumericEscape(pos - 1, lineStart, curLine);
|
|
146
|
+
}
|
|
147
|
+
// falls through (upstream parser grammar)
|
|
148
|
+
default:
|
|
149
|
+
if (ch >= 48 && ch <= 55) {
|
|
150
|
+
const startPos = pos - 1;
|
|
151
|
+
const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
|
|
152
|
+
let octalStr = match[0];
|
|
153
|
+
let octal = parseInt(octalStr, 8);
|
|
154
|
+
if (octal > 255) {
|
|
155
|
+
octalStr = octalStr.slice(0, -1);
|
|
156
|
+
octal = parseInt(octalStr, 8);
|
|
157
|
+
}
|
|
158
|
+
pos += octalStr.length - 1;
|
|
159
|
+
const next = input.charCodeAt(pos);
|
|
160
|
+
if (octalStr !== "0" || next === 56 || next === 57) {
|
|
161
|
+
if (inTemplate) {
|
|
162
|
+
return res(null);
|
|
163
|
+
} else {
|
|
164
|
+
errors.strictNumericEscape(startPos, lineStart, curLine);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return res(String.fromCharCode(octal));
|
|
168
|
+
}
|
|
169
|
+
return res(String.fromCharCode(ch));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
|
|
173
|
+
const initialPos = pos;
|
|
174
|
+
let n;
|
|
175
|
+
({
|
|
176
|
+
n,
|
|
177
|
+
pos
|
|
178
|
+
} = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
|
|
179
|
+
if (n === null) {
|
|
180
|
+
if (throwOnInvalid) {
|
|
181
|
+
errors.invalidEscapeSequence(initialPos, lineStart, curLine);
|
|
182
|
+
} else {
|
|
183
|
+
pos = initialPos - 1;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return {
|
|
187
|
+
code: n,
|
|
188
|
+
pos
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
|
|
192
|
+
const start = pos;
|
|
193
|
+
const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
|
|
194
|
+
const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
|
|
195
|
+
let invalid = false;
|
|
196
|
+
let total = 0;
|
|
197
|
+
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
|
|
198
|
+
const code = input.charCodeAt(pos);
|
|
199
|
+
let val;
|
|
200
|
+
if (code === 95 && allowNumSeparator !== "bail") {
|
|
201
|
+
const prev = input.charCodeAt(pos - 1);
|
|
202
|
+
const next = input.charCodeAt(pos + 1);
|
|
203
|
+
if (!allowNumSeparator) {
|
|
204
|
+
if (bailOnError) return {
|
|
205
|
+
n: null,
|
|
206
|
+
pos
|
|
207
|
+
};
|
|
208
|
+
errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
|
|
209
|
+
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
|
|
210
|
+
if (bailOnError) return {
|
|
211
|
+
n: null,
|
|
212
|
+
pos
|
|
213
|
+
};
|
|
214
|
+
errors.unexpectedNumericSeparator(pos, lineStart, curLine);
|
|
215
|
+
}
|
|
216
|
+
++pos;
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (code >= 97) {
|
|
220
|
+
val = code - 97 + 10;
|
|
221
|
+
} else if (code >= 65) {
|
|
222
|
+
val = code - 65 + 10;
|
|
223
|
+
} else if (_isDigit(code)) {
|
|
224
|
+
val = code - 48;
|
|
225
|
+
} else {
|
|
226
|
+
val = Infinity;
|
|
227
|
+
}
|
|
228
|
+
if (val >= radix) {
|
|
229
|
+
if (val <= 9 && bailOnError) {
|
|
230
|
+
return {
|
|
231
|
+
n: null,
|
|
232
|
+
pos
|
|
233
|
+
};
|
|
234
|
+
} else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
|
|
235
|
+
val = 0;
|
|
236
|
+
} else if (forceLen) {
|
|
237
|
+
val = 0;
|
|
238
|
+
invalid = true;
|
|
239
|
+
} else {
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
++pos;
|
|
244
|
+
total = total * radix + val;
|
|
245
|
+
}
|
|
246
|
+
if (pos === start || len != null && pos - start !== len || invalid) {
|
|
247
|
+
return {
|
|
248
|
+
n: null,
|
|
249
|
+
pos
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
return {
|
|
253
|
+
n: total,
|
|
254
|
+
pos
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
|
|
258
|
+
const ch = input.charCodeAt(pos);
|
|
259
|
+
let code;
|
|
260
|
+
if (ch === 123) {
|
|
261
|
+
++pos;
|
|
262
|
+
({
|
|
263
|
+
code,
|
|
264
|
+
pos
|
|
265
|
+
} = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
|
|
266
|
+
++pos;
|
|
267
|
+
if (code !== null && code > 1114111) {
|
|
268
|
+
if (throwOnInvalid) {
|
|
269
|
+
errors.invalidCodePoint(pos, lineStart, curLine);
|
|
270
|
+
} else {
|
|
271
|
+
return {
|
|
272
|
+
code: null,
|
|
273
|
+
pos
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
} else {
|
|
278
|
+
({
|
|
279
|
+
code,
|
|
280
|
+
pos
|
|
281
|
+
} = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
|
|
282
|
+
}
|
|
283
|
+
return {
|
|
284
|
+
code,
|
|
285
|
+
pos
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
export {
|
|
289
|
+
readCodePoint,
|
|
290
|
+
readInt,
|
|
291
|
+
readStringContents
|
|
292
|
+
};
|
package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/identifier.mjs
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Generated from Babel v7.29.8 (MIT); see README.md.
|
|
2
|
+
let nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
3
|
+
let nonASCIIidentifierChars = "\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
4
|
+
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
|
5
|
+
const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
|
6
|
+
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
|
7
|
+
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
|
|
8
|
+
const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
9
|
+
function isInAstralSet(code, set) {
|
|
10
|
+
let pos = 65536;
|
|
11
|
+
for (let i = 0, length = set.length; i < length; i += 2) {
|
|
12
|
+
pos += set[i];
|
|
13
|
+
if (pos > code) return false;
|
|
14
|
+
pos += set[i + 1];
|
|
15
|
+
if (pos >= code) return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
function isIdentifierStart(code) {
|
|
20
|
+
if (code < 65) return code === 36;
|
|
21
|
+
if (code <= 90) return true;
|
|
22
|
+
if (code < 97) return code === 95;
|
|
23
|
+
if (code <= 122) return true;
|
|
24
|
+
if (code <= 65535) {
|
|
25
|
+
return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
|
|
26
|
+
}
|
|
27
|
+
return isInAstralSet(code, astralIdentifierStartCodes);
|
|
28
|
+
}
|
|
29
|
+
function isIdentifierChar(code) {
|
|
30
|
+
if (code < 48) return code === 36;
|
|
31
|
+
if (code < 58) return true;
|
|
32
|
+
if (code < 65) return false;
|
|
33
|
+
if (code <= 90) return true;
|
|
34
|
+
if (code < 97) return code === 95;
|
|
35
|
+
if (code <= 122) return true;
|
|
36
|
+
if (code <= 65535) {
|
|
37
|
+
return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
|
|
38
|
+
}
|
|
39
|
+
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
|
|
40
|
+
}
|
|
41
|
+
function isIdentifierName(name) {
|
|
42
|
+
let isFirst = true;
|
|
43
|
+
for (let i = 0; i < name.length; i++) {
|
|
44
|
+
let cp = name.charCodeAt(i);
|
|
45
|
+
if ((cp & 64512) === 55296 && i + 1 < name.length) {
|
|
46
|
+
const trail = name.charCodeAt(++i);
|
|
47
|
+
if ((trail & 64512) === 56320) {
|
|
48
|
+
cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (isFirst) {
|
|
52
|
+
isFirst = false;
|
|
53
|
+
if (!isIdentifierStart(cp)) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
} else if (!isIdentifierChar(cp)) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return !isFirst;
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
isIdentifierChar,
|
|
64
|
+
isIdentifierName,
|
|
65
|
+
isIdentifierStart
|
|
66
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated from Babel v7.29.8 (MIT); see README.md.
|
|
2
|
+
import { isIdentifierName, isIdentifierChar, isIdentifierStart } from "./identifier.mjs";
|
|
3
|
+
import { isReservedWord, isStrictBindOnlyReservedWord, isStrictBindReservedWord, isStrictReservedWord, isKeyword } from "./keyword.mjs";
|
|
4
|
+
export {
|
|
5
|
+
isIdentifierChar,
|
|
6
|
+
isIdentifierName,
|
|
7
|
+
isIdentifierStart,
|
|
8
|
+
isKeyword,
|
|
9
|
+
isReservedWord,
|
|
10
|
+
isStrictBindOnlyReservedWord,
|
|
11
|
+
isStrictBindReservedWord,
|
|
12
|
+
isStrictReservedWord
|
|
13
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Generated from Babel v7.29.8 (MIT); see README.md.
|
|
2
|
+
const reservedWords = {
|
|
3
|
+
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
|
|
4
|
+
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
|
|
5
|
+
strictBind: ["eval", "arguments"]
|
|
6
|
+
};
|
|
7
|
+
const keywords = new Set(reservedWords.keyword);
|
|
8
|
+
const reservedWordsStrictSet = new Set(reservedWords.strict);
|
|
9
|
+
const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
|
|
10
|
+
function isReservedWord(word, inModule) {
|
|
11
|
+
return inModule && word === "await" || word === "enum";
|
|
12
|
+
}
|
|
13
|
+
function isStrictReservedWord(word, inModule) {
|
|
14
|
+
return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
|
|
15
|
+
}
|
|
16
|
+
function isStrictBindOnlyReservedWord(word) {
|
|
17
|
+
return reservedWordsStrictBindSet.has(word);
|
|
18
|
+
}
|
|
19
|
+
function isStrictBindReservedWord(word, inModule) {
|
|
20
|
+
return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
|
|
21
|
+
}
|
|
22
|
+
function isKeyword(word) {
|
|
23
|
+
return keywords.has(word);
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
isKeyword,
|
|
27
|
+
isReservedWord,
|
|
28
|
+
isStrictBindOnlyReservedWord,
|
|
29
|
+
isStrictBindReservedWord,
|
|
30
|
+
isStrictReservedWord
|
|
31
|
+
};
|