Skip to content

Commit e697b1a

Browse files
authored
chore: remove stackTrace => path dependency (#34763)
1 parent c31ce78 commit e697b1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+201
-148
lines changed

packages/playwright-core/ThirdPartyNotices.txt

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ This project incorporates components from the projects listed below. The origina
1111
- [email protected] (https://github.com/juliangruber/brace-expansion)
1212
- [email protected] (https://github.com/brianloveswords/buffer-crc32)
1313
- [email protected] (https://github.com/codemirror/CodeMirror)
14-
- [email protected] (https://github.com/Marak/colors.js)
1514
- [email protected] (https://github.com/tj/commander.js)
1615
- [email protected] (https://github.com/substack/node-concat-map)
1716
- [email protected] (https://github.com/debug-js/debug)
@@ -355,36 +354,6 @@ THE SOFTWARE.
355354
=========================================
356355
END OF [email protected] AND INFORMATION
357356

358-
%% [email protected] NOTICES AND INFORMATION BEGIN HERE
359-
=========================================
360-
MIT License
361-
362-
Original Library
363-
- Copyright (c) Marak Squires
364-
365-
Additional Functionality
366-
- Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
367-
368-
Permission is hereby granted, free of charge, to any person obtaining a copy
369-
of this software and associated documentation files (the "Software"), to deal
370-
in the Software without restriction, including without limitation the rights
371-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
372-
copies of the Software, and to permit persons to whom the Software is
373-
furnished to do so, subject to the following conditions:
374-
375-
The above copyright notice and this permission notice shall be included in
376-
all copies or substantial portions of the Software.
377-
378-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
379-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
380-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
381-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
382-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
383-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
384-
THE SOFTWARE.
385-
=========================================
386-
END OF [email protected] AND INFORMATION
387-
388357
%% [email protected] NOTICES AND INFORMATION BEGIN HERE
389358
=========================================
390359
(The MIT License)
@@ -1555,6 +1524,6 @@ END OF [email protected] AND INFORMATION
15551524

15561525
SUMMARY BEGIN HERE
15571526
=========================================
1558-
Total Packages: 46
1527+
Total Packages: 45
15591528
=========================================
15601529
END OF SUMMARY

packages/playwright-core/bundles/utils/package-lock.json

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/playwright-core/bundles/utils/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"generate-license": "node ../../../../utils/generate_third_party_notice.js"
1010
},
1111
"dependencies": {
12-
"colors": "1.4.0",
1312
"commander": "8.3.0",
1413
"debug": "^4.3.4",
1514
"diff": "^7.0.0",

packages/playwright-core/bundles/utils/src/utilsBundleImpl.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
/* eslint-disable import/order */
1818

19-
import colorsLibrary from 'colors/safe';
20-
export const colors = colorsLibrary;
21-
2219
import debugLibrary from 'debug';
2320
export const debug = debugLibrary;
2421

packages/playwright-core/src/browserServerImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { helper } from './server/helper';
2121
import { serverSideCallMetadata } from './server/instrumentation';
2222
import { createPlaywright } from './server/playwright';
2323
import { createGuid } from './server/utils/crypto';
24-
import { rewriteErrorMessage } from './utils/stackTrace';
24+
import { rewriteErrorMessage } from './utils/isomorphic/stackTrace';
2525
import { ws } from './utilsBundle';
2626

2727
import type { BrowserServer, BrowserServerLauncher } from './client/browserType';

packages/playwright-core/src/client/browserContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { mkdirIfNeeded } from '../utils/fileUtils';
3939
import { headersObjectToArray } from '../utils/isomorphic/headers';
4040
import { urlMatchesEqual } from '../utils/isomorphic/urlMatch';
4141
import { isRegExp, isString } from '../utils/isomorphic/rtti';
42-
import { rewriteErrorMessage } from '../utils/stackTrace';
42+
import { rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
4343

4444
import type { BrowserType } from './browserType';
4545
import type { BrowserContextOptions, Headers, LaunchOptions, StorageState, WaitForEventOptions } from './types';

packages/playwright-core/src/client/channelOwner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { EventEmitter } from './eventEmitter';
1818
import { ValidationError, maybeFindValidator } from '../protocol/validator';
1919
import { isUnderTest } from '../utils/debug';
2020
import { debugLogger } from '../utils/debugLogger';
21-
import { captureLibraryStackTrace, stringifyStackFrames } from '../utils/stackTrace';
21+
import { captureLibraryStackTrace, stringifyStackFrames } from '../utils/isomorphic/stackTrace';
2222
import { zones } from '../utils/zones';
2323

2424
import type { ClientInstrumentation } from './clientInstrumentation';
@@ -183,7 +183,7 @@ export abstract class ChannelOwner<T extends channels.Channel = channels.Channel
183183

184184
if (isInternal === undefined)
185185
isInternal = this._isInternalType;
186-
const stackTrace = captureLibraryStackTrace();
186+
const stackTrace = captureLibraryStackTrace(this._platform.pathSeparator);
187187
const apiZone: ApiZone = { apiName: stackTrace.apiName, frames: stackTrace.frames, isInternal, reported: false, userData: undefined, stepId: undefined };
188188

189189
try {

packages/playwright-core/src/client/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import { Worker } from './worker';
4343
import { WritableStream } from './writableStream';
4444
import { ValidationError, findValidator } from '../protocol/validator';
4545
import { debugLogger } from '../utils/debugLogger';
46-
import { formatCallLog, rewriteErrorMessage } from '../utils/stackTrace';
46+
import { formatCallLog, rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
4747
import { zones } from '../utils/zones';
4848

4949
import type { ClientInstrumentation } from './clientInstrumentation';

packages/playwright-core/src/client/network.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { urlMatches } from '../utils/isomorphic/urlMatch';
2929
import { LongStandingScope, ManualPromise } from '../utils/isomorphic/manualPromise';
3030
import { MultiMap } from '../utils/isomorphic/multimap';
3131
import { isRegExp, isString } from '../utils/isomorphic/rtti';
32-
import { rewriteErrorMessage } from '../utils/stackTrace';
32+
import { rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
3333
import { zones } from '../utils/zones';
3434
import { mime } from '../utilsBundle';
3535

packages/playwright-core/src/client/waiter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { TimeoutError } from './errors';
18-
import { rewriteErrorMessage } from '../utils/stackTrace';
18+
import { rewriteErrorMessage } from '../utils/isomorphic/stackTrace';
1919
import { zones } from '../utils/zones';
2020

2121
import type { ChannelOwner } from './channelOwner';

0 commit comments

Comments
 (0)