chore: remove old webpack folder structure (#26560)

This commit is contained in:
Marcin Strzyz 2023-08-19 16:16:44 -07:00 коммит произвёл GitHub
Родитель 09bb866333
Коммит 192b697488
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 12 добавлений и 12 удалений

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

@ -45,7 +45,7 @@ export function bundle() {
},
closeBundle: () => {
if (existsSync(path.join(config.build.outDir, 'index.html'))) {
const targetDir = path.join(__dirname, '..', 'playwright-core', 'lib', 'webpack', 'htmlReport');
const targetDir = path.join(__dirname, '..', 'playwright-core', 'lib', 'vite', 'htmlReport');
fs.mkdirSync(targetDir, { recursive: true });
fs.copyFileSync(
path.join(config.build.outDir, 'index.html'),

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

@ -85,7 +85,7 @@ export class RecorderApp extends EventEmitter implements IRecorderApp {
return false;
const uri = route.request().url().substring('https://playwright/'.length);
const file = require.resolve('../../webpack/recorder/' + uri);
const file = require.resolve('../../vite/recorder/' + uri);
fs.promises.readFile(file).then(buffer => {
route.fulfill({
requestUrl: route.request().url(),

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

@ -81,7 +81,7 @@ async function startTraceViewerServer(traceUrls: string[], options?: OpenTraceVi
return false;
}
}
const absolutePath = path.join(__dirname, '..', '..', '..', 'webpack', 'traceViewer', ...relativePath.split('/'));
const absolutePath = path.join(__dirname, '..', '..', '..', 'vite', 'traceViewer', ...relativePath.split('/'));
return server.serveFile(request, response, absolutePath);
});

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

@ -287,12 +287,12 @@ class HtmlBuilder {
this._addDataFile('report.json', htmlReport);
// Copy app.
const appFolder = path.join(require.resolve('playwright-core'), '..', 'lib', 'webpack', 'htmlReport');
const appFolder = path.join(require.resolve('playwright-core'), '..', 'lib', 'vite', 'htmlReport');
await copyFileAndMakeWritable(path.join(appFolder, 'index.html'), path.join(this._reportFolder, 'index.html'));
// Copy trace viewer.
if (this._hasTraces) {
const traceViewerFolder = path.join(require.resolve('playwright-core'), '..', 'lib', 'webpack', 'traceViewer');
const traceViewerFolder = path.join(require.resolve('playwright-core'), '..', 'lib', 'vite', 'traceViewer');
const traceViewerTargetFolder = path.join(this._reportFolder, 'trace');
const traceViewerAssetsTargetFolder = path.join(traceViewerTargetFolder, 'assets');
fs.mkdirSync(traceViewerAssetsTargetFolder, { recursive: true });

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

@ -31,7 +31,7 @@ export default defineConfig({
},
},
build: {
outDir: path.resolve(__dirname, '../playwright-core/lib/webpack/recorder'),
outDir: path.resolve(__dirname, '../playwright-core/lib/vite/recorder'),
emptyOutDir: true,
rollupOptions: {
output: {

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

@ -38,7 +38,7 @@ export default defineConfig({
},
},
build: {
outDir: path.resolve(__dirname, '../playwright-core/lib/webpack/traceViewer'),
outDir: path.resolve(__dirname, '../playwright-core/lib/vite/traceViewer'),
// Output dir is shared with vite.sw.config.ts, clearing it here is racy.
emptyOutDir: false,
rollupOptions: {

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

@ -37,7 +37,7 @@ export default defineConfig({
},
},
build: {
outDir: path.resolve(__dirname, '../playwright-core/lib/webpack/traceViewer'),
outDir: path.resolve(__dirname, '../playwright-core/lib/vite/traceViewer'),
// Output dir is shared with vite.config.ts, clearing it here is racy.
emptyOutDir: false,
rollupOptions: {

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

@ -348,7 +348,7 @@ copyFiles.push({
files: 'packages/playwright-core/src/**/*.js',
from: 'packages/playwright-core/src',
to: 'packages/playwright-core/lib',
ignored: ['**/.eslintrc.js', '**/webpack*.config.js', '**/injected/**/*']
ignored: ['**/.eslintrc.js', '**/injected/**/*']
});
// Sometimes we require JSON files that babel ignores.

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

@ -35,7 +35,7 @@ git clone "https://${GH_SERVICE_ACCOUNT_TOKEN}@github.com/microsoft/trace.playwr
if [[ "${RELEASE_CHANNEL}" == "--stable" ]]; then
rm -rf trace.playwright.dev/docs/
mkdir trace.playwright.dev/docs/
cp -r packages/playwright-core/lib/webpack/traceViewer/* trace.playwright.dev/docs/
cp -r packages/playwright-core/lib/vite/traceViewer/* trace.playwright.dev/docs/
# Restore CNAME, beta/ & next/ branches.
cd trace.playwright.dev/
@ -47,11 +47,11 @@ if [[ "${RELEASE_CHANNEL}" == "--stable" ]]; then
echo "Updated stable version"
elif [[ "${RELEASE_CHANNEL}" == "--canary" ]]; then
rm -rf trace.playwright.dev/docs/next/
cp -r packages/playwright-core/lib/webpack/traceViewer/ trace.playwright.dev/docs/next/
cp -r packages/playwright-core/lib/vite/traceViewer/ trace.playwright.dev/docs/next/
echo "Updated canary version"
elif [[ "${RELEASE_CHANNEL}" == "--beta" ]]; then
rm -rf trace.playwright.dev/docs/beta/
cp -r packages/playwright-core/lib/webpack/traceViewer/ trace.playwright.dev/docs/beta/
cp -r packages/playwright-core/lib/vite/traceViewer/ trace.playwright.dev/docs/beta/
echo "Updated beta version"
else
echo "ERROR: unknown environment - ${RELEASE_CHANNEL}"