From de6e41397bee7e20821c53364a5496b8edd740f5 Mon Sep 17 00:00:00 2001 From: Marek Piasecki Date: Thu, 26 Jan 2023 12:19:09 +0100 Subject: [PATCH] working on vite plugin --- vite-plugin-dev-readme.md | 375 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 375 insertions(+) create mode 100644 vite-plugin-dev-readme.md diff --git a/vite-plugin-dev-readme.md b/vite-plugin-dev-readme.md new file mode 100644 index 0000000..5f275c0 --- /dev/null +++ b/vite-plugin-dev-readme.md @@ -0,0 +1,375 @@ +# To start working on vite-imba-plugin (W.I.P) + +1) Clone imba monorepo. +2) Build imba - as it is used by vite-imba-plugin. +3) Install dependencies. +4) Run tests. + +``` +git clone git@github.com:imba/imba.git +cd imba/packages/imba +npm install +npm run build +cd ../vite-imba-plugin +npm install +npm run test +``` + +No luck so far: + +Error: + +``` +> vite-plugin-imba@0.10.2 rename +> node -e "require('fs').rename('dist/index.js', 'dist/index.cjs', function(err) { if (err) console.log(err); console.log('File successfully renamed!') })" + +File successfully renamed! +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +building packages done +preparations done +Starting playwright server ... + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Error during global setup ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ +Error: Browser closed. +==================== Browser output: ==================== + /opt/google/chrome/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --disable-gpu --single-process --no-zygote --no-sandbox --headless --user-data-dir=/tmp/playwright_chromiumdev_profile-k5yspy --remote-debugging-pipe --no-startup-window + pid=22753 Failed to launch browser. +==================== Browser output: ==================== + /opt/google/chrome/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --disable-gpu --single-process --no-zygote --no-sandbox --headless --user-data-dir=/tmp/playwright_chromiumdev_profile-k5yspy --remote-debugging-pipe --no-startup-window + pid=22753 + ❯ node_modules/playwright-core/lib/server/chromium/crConnection.js:206:16 + ❯ CRSession.send node_modules/playwright-core/lib/server/chromium/crConnection.js:202:12 + ❯ Function.connect node_modules/playwright-core/lib/server/chromium/crBrowser.js:58:35 + ❯ Chromium._connectToTransport node_modules/playwright-core/lib/server/chromium/chromium.js:166:33 + ❯ Chromium._innerLaunch node_modules/playwright-core/lib/server/browserType.js:155:32 + ❯ Chromium._innerLaunchWithRetries node_modules/playwright-core/lib/server/browserType.js:111:14 + ❯ ProgressController.run node_modules/playwright-core/lib/server/progress.js:101:22 + ❯ Chromium.launch node_modules/playwright-core/lib/server/browserType.js:86:21 + ❯ BrowserServerLauncherImpl.launchServer node_modules/playwright-core/lib/browserServerImpl.js:49:21 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ +Serialized Error: { + "sessionClosed": true, +} +``` + +Full log: + +``` +npm run test 11:55:08 + +> vite-plugin-imba@0.10.2 test +> cross-env rimraf ../../temp && cd ../e2e-tests && npm run test:serve && npm run test:build + + +> vite-plugin-imba-e2e-tests@1.0.0 test:serve +> vitest run -c vitest.config.e2e.ts --watch false + + +preparing non ci env... +syncing node_modules +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +install dependencies in all subfolders +npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead +npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead +npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead +npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead +npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead +npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead +npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead +npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead + +added 40 packages, changed 2 packages, and audited 386 packages in 23s + +80 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +added 51 packages, changed 2 packages, and audited 386 packages in 24s + +80 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +added 214 packages, changed 2 packages, and audited 232 packages in 28s + +69 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +added 214 packages, changed 2 packages, and audited 232 packages in 28s + +69 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +added 214 packages, changed 2 packages, and audited 232 packages in 28s + +69 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +added 214 packages, changed 2 packages, and audited 232 packages in 28s + +69 packages are looking for funding + run `npm fund` for details + +added 214 packages, changed 2 packages, and audited 232 packages in 28s + +69 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +added 214 packages, changed 2 packages, and audited 232 packages in 29s + +69 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +npm WARN idealTree Removing dependencies.imba in favor of devDependencies.imba + +removed 214 packages, changed 2 packages, and audited 20 packages in 8s + +4 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +removed 214 packages, changed 2 packages, and audited 20 packages in 9s + +4 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +removed 214 packages, changed 2 packages, and audited 20 packages in 9s + +4 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +removed 214 packages, changed 2 packages, and audited 20 packages in 9s + +4 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +removed 40 packages, changed 2 packages, and audited 348 packages in 9s + +69 packages are looking for funding + run `npm fund` for details + +removed 214 packages, changed 2 packages, and audited 20 packages in 9s + +found 0 vulnerabilities +npm notice + +4 packages are looking for funding + run `npm fund` for details +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm +found 0 vulnerabilities + notice Changelog: +npmnpm notice Run `npm install -g npm@9.4.0` to update! +npm notice + notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +removed 214 packages, changed 2 packages, and audited 20 packages in 9s + +4 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +removed 51 packages, changed 2 packages, and audited 337 packages in 10s + +68 packages are looking for funding + run `npm fund` for details + +found 0 vulnerabilities +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +building packages + +> vite-plugin-imba@0.10.2 build +> cross-env rimraf dist && npm run build:esm && npm run build:cjs + + +> vite-plugin-imba@0.10.2 build:esm +> npx imba build --keep -M --node.external +devDependencies --esm src/index.imba + +cache dir does not exist - create /home/marek/praca/vendor/imba/packages/vite-plugin-imba/node_modules/imba/.imba-cache +ℹ starting to build in dist +✔ dist/index.mjs 51.3kb +✔ dist/manifest.json 0.0kb +ℹ built src/index.imba in 2216ms - 9.72mb +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +> vite-plugin-imba@0.10.2 build:cjs +> npx imba build --keep -M --node.external +devDependencies src/index.imba && npm run rename + +ℹ starting to build in dist +✔ dist/index.js 53.0kb +✔ dist/manifest.json 0.0kb +ℹ built src/index.imba in 178ms - 9.47mb +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice + +> vite-plugin-imba@0.10.2 rename +> node -e "require('fs').rename('dist/index.js', 'dist/index.cjs', function(err) { if (err) console.log(err); console.log('File successfully renamed!') })" + +File successfully renamed! +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +npm notice +npm notice New minor version of npm available! 9.3.1 -> 9.4.0 +npm notice Changelog: +npm notice Run `npm install -g npm@9.4.0` to update! +npm notice +building packages done +preparations done +Starting playwright server ... + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Error during global setup ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ +Error: Browser closed. +==================== Browser output: ==================== + /opt/google/chrome/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --disable-gpu --single-process --no-zygote --no-sandbox --headless --user-data-dir=/tmp/playwright_chromiumdev_profile-k5yspy --remote-debugging-pipe --no-startup-window + pid=22753 Failed to launch browser. +==================== Browser output: ==================== + /opt/google/chrome/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --disable-gpu --single-process --no-zygote --no-sandbox --headless --user-data-dir=/tmp/playwright_chromiumdev_profile-k5yspy --remote-debugging-pipe --no-startup-window + pid=22753 + ❯ node_modules/playwright-core/lib/server/chromium/crConnection.js:206:16 + ❯ CRSession.send node_modules/playwright-core/lib/server/chromium/crConnection.js:202:12 + ❯ Function.connect node_modules/playwright-core/lib/server/chromium/crBrowser.js:58:35 + ❯ Chromium._connectToTransport node_modules/playwright-core/lib/server/chromium/chromium.js:166:33 + ❯ Chromium._innerLaunch node_modules/playwright-core/lib/server/browserType.js:155:32 + ❯ Chromium._innerLaunchWithRetries node_modules/playwright-core/lib/server/browserType.js:111:14 + ❯ ProgressController.run node_modules/playwright-core/lib/server/progress.js:101:22 + ❯ Chromium.launch node_modules/playwright-core/lib/server/browserType.js:86:21 + ❯ BrowserServerLauncherImpl.launchServer node_modules/playwright-core/lib/browserServerImpl.js:49:21 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ +Serialized Error: { + "sessionClosed": true, +} +```