esm - fix layer checker

pull/229915/head
Benjamin Pasero 2024-09-27 08:58:11 +02:00
parent 3b8c31c64a
commit 1d219d75ef
No known key found for this signature in database
GPG Key ID: E6380CC4C8219E65
2 changed files with 38 additions and 4 deletions

View File

@ -120,6 +120,22 @@ const RULES = [
'@types/node' // no node.js
]
},
// Common: vs/base/common/performance.ts
{
target: '**/vs/base/common/performance.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to Performance
'Performance',
'PerformanceEntry',
'PerformanceTiming'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},
// Common: vs/platform/environment/common/*
{
target: '**/vs/platform/environment/common/*.ts',
@ -174,9 +190,9 @@ const RULES = [
'@types/node' // no node.js
]
},
// Common: vs/base/parts/sandbox/electron-sandbox/preload.js
// Common: vs/base/parts/sandbox/electron-sandbox/preload.ts
{
target: '**/vs/base/parts/sandbox/electron-sandbox/preload.js',
target: '**/vs/base/parts/sandbox/electron-sandbox/preload.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to a very small subset of node.js

View File

@ -129,6 +129,24 @@ const RULES: IRule[] = [
]
},
// Common: vs/base/common/performance.ts
{
target: '**/vs/base/common/performance.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to Performance
'Performance',
'PerformanceEntry',
'PerformanceTiming'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},
// Common: vs/platform/environment/common/*
{
target: '**/vs/platform/environment/common/*.ts',
@ -189,9 +207,9 @@ const RULES: IRule[] = [
]
},
// Common: vs/base/parts/sandbox/electron-sandbox/preload.js
// Common: vs/base/parts/sandbox/electron-sandbox/preload.ts
{
target: '**/vs/base/parts/sandbox/electron-sandbox/preload.js',
target: '**/vs/base/parts/sandbox/electron-sandbox/preload.ts',
allowedTypes: [
...CORE_TYPES,