UNPKG

2.04 kBJavaScriptView Raw
1"use strict";
2
3/**
4 * @type {Array<string>}
5 */
6const roots = ["goog", "proto2", "soy", "soydata", "svgpan"];
7
8/**
9 * @type {Object<string, string>}
10 */
11const replaceMap = {
12 "goog.Disposable.MonitoringMode": "goog.Disposable",
13 "goog.Promise.CancellationError": "goog.Promise",
14 "goog.debug.GcDiagnostics_": "goog.debug.GcDiagnostics",
15 "goog.debug.Trace_": "goog.debug.Trace",
16 "goog.disposeAll": "goog.dispose",
17 "goog.dom.$F": "goog.dom.forms.getValue",
18 "goog.dom.BufferedViewportSizeMonitor.EventType": "goog.dom.BufferedViewportSizeMonitor",
19 "goog.editor.Plugin.Op": "goog.editor.Plugin",
20 "goog.ui.KeyboardShortcutHandler.Modifiers": "goog.ui.KeyboardShortcutHandler",
21 "goog.ui.SplitPane.EventType": "goog.ui.SplitPane",
22};
23
24/**
25 * @type {Array<string>}
26 */
27const ignorePackages = ["goog"];
28
29/**
30 * @type {Array<string>}
31 * @deprecated Use --depsJs
32 */
33const providedNamespaces = [
34 "goog.color.names",
35 "goog.date.month",
36 "goog.date.weekDay",
37 "goog.debug.errorHandlerWeakDep",
38 "goog.dispose",
39 "goog.dom.query",
40 "goog.ds.logger",
41 "goog.events.actionEventWrapper",
42 "goog.i18n.currencyCodeMap",
43 "goog.i18n.currencyCodeMapTier2",
44 "goog.i18n.mime.encode",
45 "goog.labs.mock",
46 "goog.labs.testing.assertThat",
47 "goog.locale.countries",
48 "goog.locale.defaultLocaleNameConstants",
49 "goog.locale.genericFontNamesData",
50 "goog.locale.nativeNameConstants",
51 "goog.locale.scriptToLanguages",
52 "goog.memoize",
53 "goog.net.cookies",
54 "goog.string.format",
55 "goog.string.html.htmlSanitize",
56 "goog.testing.recordConstructor",
57 "goog.testing.recordFunction",
58 "goog.ui.decorate",
59 "goog.userAgent.product.isVersion",
60];
61
62/**
63 * @return {Map<string, string>}
64 */
65exports.getReplaceMap = () => new Map(Object.entries(replaceMap));
66
67/**
68 * @return {Set<string>}
69 */
70exports.getProvidedNamespaces = () => new Set(providedNamespaces);
71
72/**
73 * @return {Set<string>}
74 */
75exports.getRoots = () => new Set(roots);
76
77/**
78 * @return {Set<string>}
79 */
80exports.getIgnorePackages = () => new Set(ignorePackages);