Skip to content

Commit

Permalink
fix: move files to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Mar 14, 2022
1 parent cac2914 commit a3f4836
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "hosted-git-info",
"version": "4.1.0",
"description": "Provides metadata and conversions from repository urls for GitHub, Bitbucket and GitLab",
"main": "index.js",
"main": "./lib/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/hosted-git-info.git"
Expand Down
4 changes: 2 additions & 2 deletions test/bitbucket.js
@@ -1,6 +1,6 @@
/* eslint-disable max-len */
'use strict'
const HostedGit = require('../index')
const HostedGit = require('..')
const t = require('tap')

const invalid = [
Expand All @@ -14,7 +14,7 @@ const invalid = [

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

const valid = {
Expand Down
4 changes: 2 additions & 2 deletions test/gist.js
@@ -1,6 +1,6 @@
/* eslint-disable max-len */
'use strict'
const HostedGit = require('../index')
const HostedGit = require('..')
const t = require('tap')

const invalid = [
Expand All @@ -13,7 +13,7 @@ const invalid = [
// user defaults to null for all inputs that do not specify one
// assigning the constructor here is hacky, but the only way to make assertions that compare
// a subset of properties to a found object pass as you would expect
const GitHost = require('../git-host')
const GitHost = require('../lib/git-host')
const defaults = { constructor: GitHost, type: 'gist', user: null, project: 'feedbeef' }
const valid = {
// shortcuts
Expand Down
4 changes: 2 additions & 2 deletions test/github.js
@@ -1,5 +1,5 @@
/* eslint-disable max-len */
const HostedGit = require('../index')
const HostedGit = require('..')
const t = require('tap')

const invalid = [
Expand All @@ -24,7 +24,7 @@ const invalid = [

// assigning the constructor here is hacky, but the only way to make assertions that compare
// a subset of properties to a found object pass as you would expect
const GitHost = require('../git-host')
const GitHost = require('../lib/git-host')
const defaults = { constructor: GitHost, type: 'github', user: 'foo', project: 'bar' }
const valid = {
// extreme shorthand
Expand Down
4 changes: 2 additions & 2 deletions test/gitlab.js
@@ -1,6 +1,6 @@
/* eslint-disable max-len */
'use strict'
const HostedGit = require('../index')
const HostedGit = require('..')
const t = require('tap')

const invalid = [
Expand All @@ -15,7 +15,7 @@ const invalid = [

// assigning the constructor here is hacky, but the only way to make assertions that compare
// a subset of properties to a found object pass as you would expect
const GitHost = require('../git-host')
const GitHost = require('../lib/git-host')
const defaults = { constructor: GitHost, type: 'gitlab', user: 'foo', project: 'bar' }
const subgroup = { constructor: GitHost, type: 'gitlab', user: 'foo/bar', project: 'baz' }
const valid = {
Expand Down
2 changes: 1 addition & 1 deletion test/invalid.js
@@ -1,4 +1,4 @@
const HostedGit = require('../')
const HostedGit = require('..')
const t = require('tap')

// each of these urls should return `undefined`
Expand Down
4 changes: 2 additions & 2 deletions test/localhost.js
@@ -1,6 +1,6 @@
// An example of a custom setup, useful when testing modules like pacote,
// which do various things with these git shortcuts.
const ghi = require('../git-host-info.js')
const ghi = require('../lib/git-host-info.js')
ghi.localhost = {
protocols: ['git:'],
domain: 'localhost',
Expand All @@ -13,7 +13,7 @@ ghi.localhost = {
ghi.byShortcut['localhost:'] = 'localhost'
ghi.byDomain.localhost = 'localhost'

const HostedGit = require('../')
const HostedGit = require('..')
const t = require('tap')

t.test('supports extensions', t => {
Expand Down
4 changes: 2 additions & 2 deletions test/sourcehut.js
@@ -1,5 +1,5 @@
'use strict'
const HostedGit = require('../index')
const HostedGit = require('..')
const t = require('tap')

const invalid = [
Expand All @@ -14,7 +14,7 @@ const invalid = [

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

const valid = {
Expand Down

0 comments on commit a3f4836

Please sign in to comment.