Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphql mock test #99

Merged
merged 13 commits into from
Mar 11, 2019
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules/
test/fixtures/*/node_modules
.DS_Store
.vscode/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm not sure how we ended up with .DS_Store here, but ... can this be added to your global gitignore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that happens when you open a folder in Finder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

putting stuff in gitignore is useful ; most of them have many different files in them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More directly: this belongs in your global gitignore, not the project's.

2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Configstore = require('configstore')
const pkg = require('../package.json')
const conf = new Configstore(pkg.name)

const api = process.env.NCM_API || 'api.nodesource.com'
const api = process.env.NCM_API || 'https://api.nodesource.com'

const keys = {
token: ' ',
Expand Down
4 changes: 1 addition & 3 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ module.exports = {
}

function formatAPIURL (pathname, query) {
return url.format({
protocol: 'https',
hostname: api,
return api + url.format({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better would be to parse api and then do it correctly.. idk, just in case I guess. Although I don't forsee immediate problems of any kind.

pathname,
query
})
Expand Down
Loading