Skip to content

Commit a3f4836

Browse files
committed
fix: move files to lib
1 parent cac2914 commit a3f4836

11 files changed

+14
-14
lines changed
File renamed without changes.
File renamed without changes.

index.js renamed to lib/index.js

File renamed without changes.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "hosted-git-info",
33
"version": "4.1.0",
44
"description": "Provides metadata and conversions from repository urls for GitHub, Bitbucket and GitLab",
5-
"main": "index.js",
5+
"main": "./lib/index.js",
66
"repository": {
77
"type": "git",
88
"url": "git+https://github.com/npm/hosted-git-info.git"

test/bitbucket.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable max-len */
22
'use strict'
3-
const HostedGit = require('../index')
3+
const HostedGit = require('..')
44
const t = require('tap')
55

66
const invalid = [
@@ -14,7 +14,7 @@ const invalid = [
1414

1515
// assigning the constructor here is hacky, but the only way to make assertions that compare
1616
// a subset of properties to a found object pass as you would expect
17-
const GitHost = require('../git-host')
17+
const GitHost = require('../lib/git-host')
1818
const defaults = { constructor: GitHost, type: 'bitbucket', user: 'foo', project: 'bar' }
1919

2020
const valid = {

test/gist.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable max-len */
22
'use strict'
3-
const HostedGit = require('../index')
3+
const HostedGit = require('..')
44
const t = require('tap')
55

66
const invalid = [
@@ -13,7 +13,7 @@ const invalid = [
1313
// user defaults to null for all inputs that do not specify one
1414
// assigning the constructor here is hacky, but the only way to make assertions that compare
1515
// a subset of properties to a found object pass as you would expect
16-
const GitHost = require('../git-host')
16+
const GitHost = require('../lib/git-host')
1717
const defaults = { constructor: GitHost, type: 'gist', user: null, project: 'feedbeef' }
1818
const valid = {
1919
// shortcuts

test/github.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable max-len */
2-
const HostedGit = require('../index')
2+
const HostedGit = require('..')
33
const t = require('tap')
44

55
const invalid = [
@@ -24,7 +24,7 @@ const invalid = [
2424

2525
// assigning the constructor here is hacky, but the only way to make assertions that compare
2626
// a subset of properties to a found object pass as you would expect
27-
const GitHost = require('../git-host')
27+
const GitHost = require('../lib/git-host')
2828
const defaults = { constructor: GitHost, type: 'github', user: 'foo', project: 'bar' }
2929
const valid = {
3030
// extreme shorthand

test/gitlab.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable max-len */
22
'use strict'
3-
const HostedGit = require('../index')
3+
const HostedGit = require('..')
44
const t = require('tap')
55

66
const invalid = [
@@ -15,7 +15,7 @@ const invalid = [
1515

1616
// assigning the constructor here is hacky, but the only way to make assertions that compare
1717
// a subset of properties to a found object pass as you would expect
18-
const GitHost = require('../git-host')
18+
const GitHost = require('../lib/git-host')
1919
const defaults = { constructor: GitHost, type: 'gitlab', user: 'foo', project: 'bar' }
2020
const subgroup = { constructor: GitHost, type: 'gitlab', user: 'foo/bar', project: 'baz' }
2121
const valid = {

test/invalid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const HostedGit = require('../')
1+
const HostedGit = require('..')
22
const t = require('tap')
33

44
// each of these urls should return `undefined`

test/localhost.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// An example of a custom setup, useful when testing modules like pacote,
22
// which do various things with these git shortcuts.
3-
const ghi = require('../git-host-info.js')
3+
const ghi = require('../lib/git-host-info.js')
44
ghi.localhost = {
55
protocols: ['git:'],
66
domain: 'localhost',
@@ -13,7 +13,7 @@ ghi.localhost = {
1313
ghi.byShortcut['localhost:'] = 'localhost'
1414
ghi.byDomain.localhost = 'localhost'
1515

16-
const HostedGit = require('../')
16+
const HostedGit = require('..')
1717
const t = require('tap')
1818

1919
t.test('supports extensions', t => {

test/sourcehut.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict'
2-
const HostedGit = require('../index')
2+
const HostedGit = require('..')
33
const t = require('tap')
44

55
const invalid = [
@@ -14,7 +14,7 @@ const invalid = [
1414

1515
// assigning the constructor here is hacky, but the only way to make assertions that compare
1616
// a subset of properties to a found object pass as you would expect
17-
const GitHost = require('../git-host')
17+
const GitHost = require('../lib/git-host')
1818
const defaults = { constructor: GitHost, type: 'sourcehut', user: '~foo', project: 'bar' }
1919

2020
const valid = {

0 commit comments

Comments
 (0)