chore: move libs only used in browser out of common (#31780)

This commit is contained in:
Milan Burda 2021-11-10 17:54:51 +01:00 коммит произвёл GitHub
Родитель 4c4ed6c705
Коммит 18cc33055d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -232,7 +232,9 @@ auto_filenames = {
"lib/browser/ipc-main-internal-utils.ts",
"lib/browser/ipc-main-internal.ts",
"lib/browser/message-port-main.ts",
"lib/browser/parse-features-string.ts",
"lib/browser/rpc-server.ts",
"lib/browser/web-view-events.ts",
"lib/common/api/clipboard.ts",
"lib/common/api/deprecate.ts",
"lib/common/api/module-list.ts",
@ -241,9 +243,7 @@ auto_filenames = {
"lib/common/define-properties.ts",
"lib/common/init.ts",
"lib/common/ipc-messages.ts",
"lib/common/parse-features-string.ts",
"lib/common/reset-search-paths.ts",
"lib/common/web-view-events.ts",
"lib/common/web-view-methods.ts",
"lib/common/webpack-globals-provider.ts",
"lib/renderer/ipc-renderer-internal-utils.ts",

Просмотреть файл

@ -4,7 +4,7 @@ import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/m
import * as url from 'url';
import * as path from 'path';
import { openGuestWindow, makeWebPreferences, parseContentTypeFormat } from '@electron/internal/browser/guest-window-manager';
import { parseFeatures } from '@electron/internal/common/parse-features-string';
import { parseFeatures } from '@electron/internal/browser/parse-features-string';
import { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal';
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils';
import { MessagePortMain } from '@electron/internal/browser/message-port-main';

Просмотреть файл

@ -1,9 +1,9 @@
import { webContents } from 'electron/main';
import { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal';
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils';
import { parseWebViewWebPreferences } from '@electron/internal/common/parse-features-string';
import { parseWebViewWebPreferences } from '@electron/internal/browser/parse-features-string';
import { syncMethods, asyncMethods, properties } from '@electron/internal/common/web-view-methods';
import { webViewEvents } from '@electron/internal/common/web-view-events';
import { webViewEvents } from '@electron/internal/browser/web-view-events';
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
interface GuestInstance {

Просмотреть файл

@ -7,7 +7,7 @@
*/
import { BrowserWindow } from 'electron/main';
import type { BrowserWindowConstructorOptions, Referrer, WebContents, LoadURLOptions } from 'electron/main';
import { parseFeatures } from '@electron/internal/common/parse-features-string';
import { parseFeatures } from '@electron/internal/browser/parse-features-string';
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
type PostData = LoadURLOptions['postData']

Просмотреть файл

@ -2,7 +2,7 @@
* Utilities to parse comma-separated key value pairs used in browser APIs.
* For example: "x=100,y=200,width=500,height=500"
*/
import { BrowserWindowConstructorOptions } from 'electron';
import { BrowserWindowConstructorOptions } from 'electron/main';
type RequiredBrowserWindowConstructorOptions = Required<BrowserWindowConstructorOptions>;
type IntegerBrowserWindowOptionKeys = {

Просмотреть файл

Просмотреть файл

@ -2,7 +2,7 @@ import { expect } from 'chai';
describe('feature-string parsing', () => {
it('is indifferent to whitespace around keys and values', () => {
const { parseCommaSeparatedKeyValue } = require('../lib/common/parse-features-string');
const { parseCommaSeparatedKeyValue } = require('../lib/browser/parse-features-string');
const checkParse = (string: string, parsed: Record<string, string | boolean>) => {
const features = parseCommaSeparatedKeyValue(string);
expect(features).to.deep.equal(parsed);