Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug/1385 better sanitize Rollup importer for when resolving user workspace resources #1388

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Jan 19, 2025

Related Issue

#1385

TypeError: Invalid URL
    at new URL (node:internal/url:775:36)
    at Object.resolveId (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/@greenwood/cli/src/config/rollup.config.js:30:27)
    at file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/rollup/dist/es/shared/node-entry.js:20812:40
    at async PluginDriver.hookFirstAndGetPlugin (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/rollup/dist/es/shared/node-entry.js:20712:28)
    at async resolveId (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/rollup/dist/es/shared/node-entry.js:19316:26)
    at async ModuleLoader.resolveId (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/rollup/dist/es/shared/node-entry.js:19745:15)
    at async Object.resolveId (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/@rollup/plugin-commonjs/dist/es/index.js:580:15) {
  code: 'PLUGIN_ERROR',
  input: 'file://\x00stream?commonjs-external',
  pluginCode: 'ERR_INVALID_URL',
  plugin: 'commonjs--resolver',
  hook: 'resolveId'
}

Documentation

N / A

Summary of Changes

  1. Regression from bug/issue 1385 better guard relative rollup resolution to only user workspace files #1384 , so better "sanitizing" Rollup importer when handling user workspace resolution (was getting values like \x00stream?commonjs-external which was breaking URL)

@thescientist13 thescientist13 added bug Something isn't working CLI alpha.6 v0.31.0 labels Jan 19, 2025
@thescientist13 thescientist13 added this to the 1.0 milestone Jan 19, 2025
@thescientist13 thescientist13 self-assigned this Jan 19, 2025
@thescientist13 thescientist13 linked an issue Jan 19, 2025 that may be closed by this pull request
@thescientist13 thescientist13 force-pushed the bug/issue-1385-better-sanitize-rollup-importer-when-resolving-workspace-resources branch from 1ebc0cf to 2716a7f Compare January 23, 2025 16:48
@thescientist13 thescientist13 merged commit da4ff77 into master Jan 23, 2025
10 checks passed
@thescientist13 thescientist13 deleted the bug/issue-1385-better-sanitize-rollup-importer-when-resolving-workspace-resources branch January 23, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.6 bug Something isn't working CLI v0.31.0
Projects
Development

Successfully merging this pull request may close these issues.

rollup bundling failing trying to resolve directories
1 participant