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 committed by GitHub
parent 4c4ed6c705
commit 18cc33055d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 deletions

View file

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

View file

@ -4,7 +4,7 @@ import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/m
import * as url from 'url'; import * as url from 'url';
import * as path from 'path'; import * as path from 'path';
import { openGuestWindow, makeWebPreferences, parseContentTypeFormat } from '@electron/internal/browser/guest-window-manager'; 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 { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal';
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils'; import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils';
import { MessagePortMain } from '@electron/internal/browser/message-port-main'; import { MessagePortMain } from '@electron/internal/browser/message-port-main';

View file

@ -1,9 +1,9 @@
import { webContents } from 'electron/main'; import { webContents } from 'electron/main';
import { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal'; import { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal';
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils'; 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 { 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'; import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
interface GuestInstance { interface GuestInstance {

View file

@ -7,7 +7,7 @@
*/ */
import { BrowserWindow } from 'electron/main'; import { BrowserWindow } from 'electron/main';
import type { BrowserWindowConstructorOptions, Referrer, WebContents, LoadURLOptions } 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'; import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
type PostData = LoadURLOptions['postData'] type PostData = LoadURLOptions['postData']

View file

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

View file

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