Skip to content

Conversation

@thomasdraebing
Copy link

Aspect_rules_js supports fetching a git repository containing an npm package. However, to follow that path, it is required that the URL of the repository is prefixed with git+. However, this URL is then also configured as the remote for the git repository. The git+ prefix is not supported by git and thus fetching fails with:

git: 'remote-git+https' ist kein Git-Befehl. Siehe 'git --help'.

To prevent this, the git+-prefix is now being removed, if it is present before setting it as remote url.formation ends up in the git log.
-->


Changes are visible to end-users: no

Test plan

  • Manual testing; please provide instructions so we can reproduce:

Install an NPM package from a git repository. The pnpm-lock.yaml may look like this:

lockfileVersion: '6.0'

settings:
  autoInstallPeers: true
  excludeLinksFromLockfile: false

dependencies:
  highlight.js:
    specifier: ^11.11.1
    version: 11.11.1
  highlightjs-ttcn3:
    specifier: https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d
    version: gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d

packages:
  /highlight.js@11.11.1:
    resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==}
    engines: {node: '>=12.0.0'}
    dev: false

  gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d:
    resolution:
      type: git
      repo: git+https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git
      commit: 6daccff309fca1e7561a43984d42fa4f829ce06d
    name: highlightjs-ttcn3
    version: 0.0.1
    dependencies:
      highlight.js: 11.11.1
    dev: false

Aspect_rules_js supports fetching a git repository containing an npm
package. However, to follow that path, it is required that the URL
of the repository is prefixed with `git+`. However, this URL is then
also configured as the remote for the git repository. The `git+`
prefix is not supported by git and thus fetching fails with:

git: 'remote-git+https' ist kein Git-Befehl. Siehe 'git --help'.

To prevent this, the `git+`-prefix is now being removed, if it
is present before setting it as remote url.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@aspect-workflows
Copy link

aspect-workflows bot commented Oct 22, 2025

Test

All tests were cache hits

278 tests (100.0%) were fully cached saving 37s.


Test

e2e/bzlmod

All tests were cache hits

5 tests (100.0%) were fully cached saving 618ms.


Test

e2e/git_dep_metadata

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/gyp_no_install_script

All tests were cache hits

2 tests (100.0%) were fully cached saving 173ms.


Test

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 7s.


Test

e2e/npm_link_package

All tests were cache hits

3 tests (100.0%) were fully cached saving 407ms.


Test

e2e/npm_link_package-esm

All tests were cache hits

3 tests (100.0%) were fully cached saving 484ms.


Test

e2e/npm_link_package-rerooted

All tests were cache hits

3 tests (100.0%) were fully cached saving 536ms.


Test

e2e/npm_translate_lock

All tests were cache hits

3 tests (100.0%) were fully cached saving 919ms.


Test

e2e/npm_translate_lock_disable_hooks

All tests were cache hits

3 tests (100.0%) were fully cached saving 247ms.


Test

e2e/npm_translate_lock_empty

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_exclude_package_contents

All tests were cache hits

1 test (100.0%) was fully cached saving 34ms.


Test

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 164ms.


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 61ms.


Test

e2e/npm_translate_lock_replace_packages

All tests were cache hits

3 tests (100.0%) were fully cached saving 295ms.


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 95ms.


Test

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/package_json_module

All tests were cache hits

1 test (100.0%) was fully cached saving 348ms.


Test

e2e/patch_from_repo

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/pnpm_lockfiles

All tests were cache hits

67 tests (100.0%) were fully cached saving 9s.


Test

e2e/pnpm_repo_install

All tests were cache hits

1 test (100.0%) was fully cached saving 2s.


Test

e2e/pnpm_workspace

All tests were cache hits

15 tests (100.0%) were fully cached saving 3s.


Test

e2e/pnpm_workspace_deps

All tests were cache hits

3 tests (100.0%) were fully cached saving 901ms.


Test

e2e/pnpm_workspace_rerooted

All tests were cache hits

15 tests (100.0%) were fully cached saving 5s.


Test

e2e/repo_mapping

All tests were cache hits

3 tests (100.0%) were fully cached saving 454ms.


Test

e2e/rules_foo

All tests were cache hits

2 tests (100.0%) were fully cached saving 258ms.


Test

e2e/runfiles

All tests were cache hits

1 test (100.0%) was fully cached saving 118ms.


Test

e2e/stamped_package_json

All tests were cache hits

1 test (100.0%) was fully cached saving 44ms.


Test

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 78ms.


Test

e2e/vendored_tarfile

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/verify_patches

All tests were cache hits

2 tests (100.0%) were fully cached saving 109ms.


Test

e2e/worker

All tests were cache hits

1 test (100.0%) was fully cached saving 35ms.


Test

e2e/workspace

All tests were cache hits

1 test (100.0%) was fully cached saving 35ms.


Buildifier      Format

@jbedard
Copy link
Member

jbedard commented Oct 22, 2025

Can you add a test which fails without your fix?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants