Skip to content

Commit

Permalink
Merge pull request #73 from pkgjs/bump
Browse files Browse the repository at this point in the history
  • Loading branch information
dominykas committed Jan 31, 2022
2 parents d5a7deb + 80f9745 commit e8c518b
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 43 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,11 @@ on:
jobs:

test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 16, 14, 12, 10 ]

steps:
- uses: actions/checkout@v2
- run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test
uses: pkgjs/action/.github/workflows/node-test.yaml@v0
with:
post-checkout-steps: |
- name: Set git user to avoid warnings
shell: bash
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
language: node_js

import:
- nodejs/ci-config-travis:lts/gte-10.yml
- nodejs/ci-config-travis:lts/gte-14.yml

cache:
npm: false

install:
- "npm install -g npm"
- "npm install --ignore-scripts"
- "npx allow-scripts"
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@
"url": "https://github.com/pkgjs/detect-node-support/issues"
},
"engines": {
"node": ">=10"
"node": ">=14"
},
"homepage": "https://github.com/pkgjs/detect-node-support#readme",
"devDependencies": {
"@hapi/code": "^8.0.0",
"@hapi/lab": "^24.0.0",
"allow-scripts": "^1.5.2",
"nock": "^13.0.0",
"sinon": "^11.0.0"
"sinon": "^13.0.0"
},
"dependencies": {
"@npmcli/arborist": "^2.1.0",
"@npmcli/arborist": "^4.0.0",
"@octokit/plugin-throttling": "^3.2.2",
"@octokit/rest": "^18.0.0",
"@pkgjs/nv": "0.1.0",
"@pkgjs/nv": "0.2.1",
"debug": "^4.1.1",
"git-url-parse": "^11.1.2",
"js-yaml": "^4.0.0",
"minimist": "^1.2.5",
"pacote": "^11.1.0",
"simple-git": "^2.13.1",
"pacote": "^12.0.0",
"simple-git": "^3.0.0",
"tmp": "^0.2.0"
}
}
7 changes: 4 additions & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": [
"config:base"
],
"rangeStrategy": "replace"
"config:base",
":preserveSemverRanges",
":disableDependencyDashboard"
]
}
3 changes: 2 additions & 1 deletion test/fixtures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ module.exports = class TestContext {

Nock('https://api.github.com')
.persist()
.get('/repos/nodejs/ci-config-travis/contents/lts%2Fgte-10.yml')
.get('/repos/nodejs/ci-config-travis/contents/lts%2Fgte-14.yml')
.reply(200, {
// note: this is mocked out to an earlier version of node, to avoid having to update too many assertions/fixtures
content: Fs.readFileSync(Path.join(__dirname, 'travis-ymls', 'nodejs-ci-config-travis-gte-10.yml')).toString('base64')
});

Expand Down
31 changes: 16 additions & 15 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -454,7 +454,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -491,7 +491,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand All @@ -518,7 +518,7 @@ describe('detect-node-support', () => {
version: '0.0.0-development',
commit: '9cef39d21ad229dea4b10295f55b0d9a83800b23',
timestamp: 1580673602000,
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -596,7 +596,7 @@ describe('detect-node-support', () => {
content: Fs.readFileSync(Path.join(__dirname, '..', 'package.json')).toString('base64')
})
.get('/repos/pkgjs/detect-node-support/contents/.travis.yml')
.reply(403, null, {
.reply(403, '', {
'x-ratelimit-limit': '60',
'x-ratelimit-remaining': '0',
'x-ratelimit-reset': `${Math.round(Date.now() / 1000) + 1}`
Expand All @@ -621,7 +621,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand All @@ -635,10 +635,11 @@ describe('detect-node-support', () => {
.reply(200, {
content: Fs.readFileSync(Path.join(__dirname, '..', 'package.json')).toString('base64')
})
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
.get('/repos/pkgjs/detect-node-support/contents/.travis.yml')
.reply(403, 'Abuse detected');
.reply(403, 'You have exceeded a secondary rate limit');

await expect(NodeSupport.detect({ repository: 'git+https://github.com/pkgjs/detect-node-support.git' })).to.reject(/Abuse detected/);
await expect(NodeSupport.detect({ repository: 'git+https://github.com/pkgjs/detect-node-support.git' })).to.reject(/You have exceeded a secondary rate limit/);
});
});

Expand Down Expand Up @@ -685,7 +686,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -716,7 +717,7 @@ describe('detect-node-support', () => {
version: '0.0.0-development',
commit: '9cef39d21ad229dea4b10295f55b0d9a83800b23',
timestamp: 1580673602000,
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -814,7 +815,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -864,7 +865,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -901,7 +902,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -938,7 +939,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand Down Expand Up @@ -979,7 +980,7 @@ describe('detect-node-support', () => {
'14': '14.3.0'
}
},
engines: '>=10'
engines: '>=14'
});
});

Expand Down

0 comments on commit e8c518b

Please sign in to comment.