diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bf3136d..d735ccf 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -34,3 +34,20 @@ updates: - "Backport" - "release/v5" open-pull-requests-limit: 10 + - package-ecosystem: npm + directory: / + schedule: + interval: daily + target-branch: "release/v6" + allow: + - dependency-type: direct + dependency-name: "@npmcli/template-oss" + versioning-strategy: increase-if-necessary + commit-message: + prefix: deps + prefix-development: chore + labels: + - "Dependencies" + - "Backport" + - "release/v6" + open-pull-requests-limit: 10 diff --git a/.github/settings.yml b/.github/settings.yml index f9e45f1..206b6ee 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -39,3 +39,17 @@ branches: apps: [] users: [] teams: [ "cli-team" ] + - name: release/v6 + protection: + required_status_checks: null + enforce_admins: true + block_creations: true + required_pull_request_reviews: + required_approving_review_count: 1 + require_code_owner_reviews: true + require_last_push_approval: true + dismiss_stale_reviews: true + restrictions: + apps: [] + users: [] + teams: [ "cli-team" ] diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 32ac658..c2430e7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "8.0.0" + ".": "8.0.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index e88e118..aa3e8d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [8.0.1](https://github.com/npm/hosted-git-info/compare/v8.0.0...v8.0.1) (2024-11-20) +### Bug Fixes +* [`e47b7e4`](https://github.com/npm/hosted-git-info/commit/e47b7e476199820446483aefa0525d4726e49450) [#274](https://github.com/npm/hosted-git-info/pull/274) break up greedy host fragment parsing regex (#274) (@wraithgar) +### Chores +* [`3d55d13`](https://github.com/npm/hosted-git-info/commit/3d55d1316d1b323b1402ad2c642c6d1f37249058) [#277](https://github.com/npm/hosted-git-info/pull/277) fix workflows for new backport branch (#277) (@wraithgar) +* [`b3e455f`](https://github.com/npm/hosted-git-info/commit/b3e455fd7d66c2c967dba0cc624db8ed142bb86f) [#273](https://github.com/npm/hosted-git-info/pull/273) bump @npmcli/template-oss from 4.23.3 to 4.23.4 (#273) (@dependabot[bot], @npm-cli-bot) + ## [8.0.0](https://github.com/npm/hosted-git-info/compare/v7.0.2...v8.0.0) (2024-09-03) ### ⚠️ BREAKING CHANGES * `hosted-git-info` now supports node `^18.17.0 || >=20.5.0` diff --git a/lib/hosts.js b/lib/hosts.js index 9a08efd..da10edf 100644 --- a/lib/hosts.js +++ b/lib/hosts.js @@ -4,7 +4,11 @@ const maybeJoin = (...args) => args.every(arg => arg) ? args.join('') : '' const maybeEncode = (arg) => arg ? encodeURIComponent(arg) : '' -const formatHashFragment = (f) => f.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') +const formatHashFragment = (f) => f.toLowerCase() + .replace(/^\W+/g, '') // strip leading non-characters + .replace(/\W+$/g, '') // strip trailing non-characters + .replace(/\//g, '') // strip all slashes + .replace(/\W+/g, '-') // replace remaining non-characters with '-' const defaults = { sshtemplate: ({ domain, user, project, committish }) => diff --git a/package.json b/package.json index 3bb8bcd..fcd1b79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hosted-git-info", - "version": "8.0.0", + "version": "8.0.1", "description": "Provides metadata and conversions from repository urls for GitHub, Bitbucket and GitLab", "main": "./lib/index.js", "repository": { @@ -35,7 +35,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", + "@npmcli/template-oss": "4.23.4", "tap": "^16.0.1" }, "files": [ @@ -55,7 +55,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", + "version": "4.23.4", "publish": "true" } }