chrome-devtools-frontend 1.0.961907 → 1.0.962581

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.
@@ -45,8 +45,3 @@ TextUtils.BalancedJSONTokenizer = TextUtilsModule.TextUtils.BalancedJSONTokenize
45
45
  TextUtils.TokenizerFactory = TextUtilsModule.TextUtils.TokenizerFactory;
46
46
 
47
47
  TextUtils.isMinified = TextUtilsModule.TextUtils.isMinified;
48
-
49
- TextUtils.CodeMirrorUtils = {};
50
-
51
- /** @constructor */
52
- TextUtils.CodeMirrorUtils.TokenizerFactory = TextUtilsModule.CodeMirrorUtils.TokenizerFactory;
@@ -2,7 +2,6 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- import * as CodeMirrorUtils from './CodeMirrorUtils.js';
6
5
  import * as ContentProvider from './ContentProvider.js';
7
6
  import * as StaticContentProvider from './StaticContentProvider.js';
8
7
  import * as Text from './Text.js';
@@ -11,7 +10,6 @@ import * as TextRange from './TextRange.js';
11
10
  import * as TextUtils from './TextUtils.js';
12
11
 
13
12
  export {
14
- CodeMirrorUtils,
15
13
  ContentProvider,
16
14
  StaticContentProvider,
17
15
  Text,
package/package.json CHANGED
@@ -53,5 +53,5 @@
53
53
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
54
54
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
55
55
  },
56
- "version": "1.0.961907"
56
+ "version": "1.0.962581"
57
57
  }
@@ -90,8 +90,6 @@ template("devtools_entrypoint") {
90
90
  _copy_target_name = _entrypoint_target_name + "-copy"
91
91
  _rollup_target_name = _entrypoint_target_name + "-rollup"
92
92
  _prebundle_target_name = _entrypoint_target_name + "-tsconfig"
93
- _generated_declaration_target_name =
94
- _entrypoint_target_name + "-generate-declaration"
95
93
 
96
94
  node_action(_copy_target_name) {
97
95
  script = "scripts/build/ninja/copy-file.js"
@@ -146,27 +144,37 @@ template("devtools_entrypoint") {
146
144
  public_deps = [ ":$_prebundle_target_name" ] + invoker.deps
147
145
  }
148
146
 
149
- # TypeScript requires a `module.d.ts` that describes
150
- # the public API of the `module.js` entrypoint. To do so, we copy
151
- # the generated `prebundle.d.ts` over, as the public API for a
152
- # rolled up bundle remains the same.
153
- node_action(_generated_declaration_target_name) {
154
- script = "scripts/build/ninja/generate-declaration.js"
147
+ if (!devtools_skip_typecheck) {
148
+ _generated_declaration_target_name =
149
+ _entrypoint_target_name + "-generate-declaration"
155
150
 
156
- args = [
157
- rebase_path(target_gen_dir, root_build_dir),
158
- invoker.entrypoint,
159
- ]
151
+ # TypeScript requires a `module.d.ts` that describes
152
+ # the public API of the `module.js` entrypoint. To do so, we copy
153
+ # the generated `prebundle.d.ts` over, as the public API for a
154
+ # rolled up bundle remains the same.
155
+ node_action(_generated_declaration_target_name) {
156
+ script = "scripts/build/ninja/generate-declaration.js"
157
+
158
+ args = [
159
+ rebase_path(target_gen_dir, root_build_dir),
160
+ invoker.entrypoint,
161
+ ]
160
162
 
161
- public_deps = [
163
+ public_deps = [
164
+ ":$_prebundle_target_name",
165
+ ":$_rollup_target_name",
166
+ ]
167
+
168
+ outputs = [ "$target_gen_dir/$_entrypoint_output_file_name.d.ts" ]
169
+ }
170
+
171
+ _devtools_entrypoint_deps += [ ":$_generated_declaration_target_name" ]
172
+ } else {
173
+ _devtools_entrypoint_deps += [
162
174
  ":$_prebundle_target_name",
163
175
  ":$_rollup_target_name",
164
176
  ]
165
-
166
- outputs = [ "$target_gen_dir/$_entrypoint_output_file_name.d.ts" ]
167
177
  }
168
-
169
- _devtools_entrypoint_deps += [ ":$_generated_declaration_target_name" ]
170
178
  }
171
179
 
172
180
  # Because we change the filename before rolling up the bundle,
@@ -75,6 +75,10 @@ def hosted_mode_script_path():
75
75
  return path.join(devtools_root_path(), 'scripts', 'hosted_mode', 'server.js')
76
76
 
77
77
 
78
+ def esbuild_path():
79
+ return path.join(devtools_root_path(), 'third_party', 'esbuild', 'esbuild')
80
+
81
+
78
82
  def downloaded_chrome_binary_path():
79
83
  return path.abspath(path.join(
80
84
  *{
@@ -62,15 +62,10 @@ const emitHeaderComments = () => {
62
62
  emitLine();
63
63
  };
64
64
 
65
- const emitModule = (moduleName: string, domains: Protocol.Domain[]) => {
66
- moduleName = toTitleCase(moduleName);
65
+ const emitModule = (domains: Protocol.Domain[]) => {
67
66
  emitHeaderComments();
68
- emitOpenBlock(`declare namespace ${moduleName}`);
69
67
  emitGlobalTypeDefs();
70
68
  domains.forEach(emitDomain);
71
- emitCloseBlock();
72
- emitLine();
73
- emitLine('export = Protocol;');
74
69
  };
75
70
 
76
71
  const emitGlobalTypeDefs = () => {
@@ -443,9 +438,9 @@ const flushEmitToFile = (path: string) => {
443
438
  const main = () => {
444
439
  const FRONTEND_GENERATED_DIR = path.resolve(__dirname, path.join('../../front_end/generated'));
445
440
 
446
- const destProtocolFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol.d.ts');
447
- const protocolModuleName = path.basename(destProtocolFilePath, '.d.ts');
448
- emitModule(protocolModuleName, protocolDomains);
441
+ const destProtocolFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol.ts');
442
+ const protocolModuleName = path.basename(destProtocolFilePath, '.ts');
443
+ emitModule(protocolDomains);
449
444
  flushEmitToFile(destProtocolFilePath);
450
445
 
451
446
  const destMappingFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol-mapping.d.ts');