Skip to content

Commit

Permalink
WebUI: Add TypeScript @types package for Trusted Types
Browse files Browse the repository at this point in the history
Specifically, this adds @types/trusted-types as dependency.

NOTE: This type definition might be included in future versions of TS:
microsoft/TypeScript#30024

Also updates npm_include and npm_exclude to have the .d.ts in those
packages to be actually included in the packed node_modules.tar.gz.

This increases the uncompressed node_modules size by about 1.2k.

Trusted Types is used by //ui/webui/resources/js/static_types.js which
in turn is used by cr.ui.Tree and Files app.

Bug: b:228404803
Change-Id: Icb50826e520665f74eb21c88e976b3df5f0d00d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577873
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/main@{#991648}
  • Loading branch information
Luciano Pacheco authored and Chromium LUCI CQ committed Apr 12, 2022
1 parent cc7207e commit 5ffe647
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
16 changes: 16 additions & 0 deletions third_party/node/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,19 @@ TypeScript source code.

Local Modifications:
(none)


Name: Type Definition for Trusted Types
Short Name: @types/trusted-types
URL: https://www.npmjs.com/package/@types/trusted-types
Version: 1.0.6
License: MIT
Security Critical: No. The types are only used when type checking the Web
Trusted Types:

Description:
This package contains type definitions for Web Trusted Types.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types

Local Modifications:
(none)
2 changes: 1 addition & 1 deletion third_party/node/node_modules.tar.gz.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0baf1b0dba664e771dfe0ea3c155674bef85ca39
df473d4b1ab26ce6b669007521f2ffb8ff99f9d7
2 changes: 2 additions & 0 deletions third_party/node/npm_include.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
@types/google.analytics/*.d.ts
@types/mocha/index.d.ts
@types/offscreencanvas/index.d.ts
@types/trusted-types
@types/trusted-types/*.d.ts
@types/w3c-css-typed-object-model-level-1
@types/w3c-css-typed-object-model-level-1/*.d.ts
@types/w3c-image-capture
Expand Down
11 changes: 11 additions & 0 deletions third_party/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions third_party/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"@types/google.analytics": "0.0.42",
"@types/mocha": "9.0.0",
"@types/offscreencanvas": "2019.6.4",
"@types/trusted-types": "1.0.6",
"@types/w3c-css-typed-object-model-level-1": "20180410.0.4",
"@types/w3c-image-capture": "1.0.4",
"@types/webrtc": "0.0.31",
Expand Down

0 comments on commit 5ffe647

Please sign in to comment.