Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

fix(deps): migrate validate-color to official npm package#379

Open
lewinpauli wants to merge 1 commit intooae:masterfrom
lewinpauli:master
Open

fix(deps): migrate validate-color to official npm package#379
lewinpauli wants to merge 1 commit intooae:masterfrom
lewinpauli:master

Conversation

@lewinpauli
Copy link

@lewinpauli lewinpauli commented Dec 15, 2025

couldnt start on fedora 43 gnome 49 branch master

The Bug

yarn install was not possible and created the following error:

yarn install
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
error Error: https://gitpkg.now.sh/dreamyguy/validate-color/src/validate-color: Request failed "402 Payment Required"
at Request.<anonymous> (/usr/lib/node_modules_22/yarn/lib/util/request-manager.js:521:16)
at Request.emit (node:events:519:28)
at Request.onRequestResponse (/usr/lib/node_modules_22/yarn/node_modules/request/request.js:1059:10)
at ClientRequest.emit (node:events:519:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:716:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:121:17)
at TLSSocket.socketOnData (node:_http_client:558:22)
at TLSSocket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying.

after yarn install was fixed, Gnome Extension manager showed the following errors:

SyntaxError: The requested module 'file:///home/coco/.local/share/gnome-shell/extensions/pano@elhan.io/thirdparty/validate_color.js' doesn't provide an export named: 'validateHTMLColorHex' @ file:///home/coco/.local/share/gnome-shell/extensions/pano@elhan.io/extension.js:59:10

The Fix

Migrate validate-color to official npm package

Problem
The validate-color dependency was using a custom GitHub package URL (https://gitpkg.now.sh/dreamyguy/validate-color/src/validate-color) which caused build issues with named exports not being properly re-exported during the rollup bundling process.

Changes Made

  1. package.json
    Updated validate-color dependency from gitpkg URL to official npm registry version ^2.2.4
  2. rollup.config.mjs
    Added namedExportsConfig object to explicitly define named exports for packages that need them:
    validateHTMLColorName
    validateHTMLColorSpecialName
    validateHTMLColorHex
    validateHTMLColorRgb
    validateHTMLColorHsl
    validateHTMLColorHwb
    validateHTMLColorLab
    validateHTMLColorLch
    validateHTMLColor
    Enhanced commonjs() plugin configuration with requireReturnsDefault: 'auto' and conditional defaultIsModuleExports
    Added custom rollup plugin (export-named) to properly re-export named exports from bundled packages
  3. Added Gnome session restart to readme (including screenshot)

yarn install && yarn build && pano works now

Fixes
#378
#281

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • My commits follow the commit standards of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

- Replace gitpkg.now.sh URL with npm registry version ^2.2.4
- Add named exports configuration in rollup for validate-color
- Add custom rollup plugin to re-export named exports from bundled package

docs: add GNOME session restart instructions to README
@wanstu
Copy link

wanstu commented Jan 19, 2026

Ubuntu 25.10 x86_64 Gnome shell 49.0
I successfully built and installed using this pull request. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants