ds300 / ds300/patch-package

Patching Git modules without version

Open
#497 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Description

I'm attempting to patch a package distributed via Git ([Antora's default UI](https://gitlab.com/antora/antora-ui-default)) that doesn't have a version number in its `package.json`. Not terribly surprisingly, `patch-package` isn't thrilled about this:

```
...\node_modules\patch-package\dist\makePatch.js:395
throw e;
^

TypeError: Cannot read properties of undefined (reading 'replace')
at Object.getPackageVersion (...\node_modules\patch-package\dist\getPackageVersion.js:6:51)
at Object.makePatch (...\node_modules\patch-package\dist\makePatch.js:111:52)
at ...\node_modules\patch-package\dist\index.js:72:25
at Array.forEach ()
at Object. (...\node_modules\patch-package\dist\index.js:71:22)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)

Node.js v18.18.0
```

I've attempted explicitly installing the package by commit ID to no avail. Am I missing something, or is this currently not supported?

If not, I'd like to request that support be added. I'd expect `patch-package` to patch against the current "version" (in this case, the provided or default Git branch) if no version information is available.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.