Skip to content

Commit

Permalink
Merge branch 'raineorshine:main' into feat/bun
Browse files Browse the repository at this point in the history
  • Loading branch information
ImBIOS authored Aug 16, 2023
2 parents 06e1fb1 + 3bf2149 commit e2cb27a
Show file tree
Hide file tree
Showing 17 changed files with 1,127 additions and 1,262 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,16 @@ jobs:
node-version: ${{ matrix.node }}
cache: npm

# node v14 cannot install from current package-lock.json, so use npm install instea of npm ci.
# Cannot read property 'chalk' of undefined
# Regression: e88617964a009dbb9f5e973f64ff76ad289df68c
- name: Install npm dependencies
run: npm i
if: 'matrix.node == 14'

- name: Install npm dependencies
run: npm ci
if: 'matrix.node != 14'

- name: Build
run: npm run build
Expand Down
2 changes: 2 additions & 0 deletions .ncurc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ module.exports = {
// Waiting for Prettier v3 support in @trivago/prettier-plugin-sort-imports
// https://github.com/trivago/prettier-plugin-sort-imports/issues/240
'prettier',
// Removed support for node v14 in v0.35.0
'makdownlint-cli',
],
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
</tr>
<tr>
<td>-t, --target <value></td>
<td>Determines the version to upgrade to: latest, newest, greatest, minor, patch, @[tag], or [function]. (default: latest)</td>
<td>Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest)</td>
</tr>
<tr>
<td>--timeout <ms></td>
Expand Down Expand Up @@ -424,18 +424,18 @@ Only available in .ncurc.js or when importing npm-check-updates as a module.

```js
/** Filter out non-major version updates.
@param {string} packageName The name of the dependency.
@param {string} currentVersion Current version declaration (may be range).
@param {SemVer[]} currentVersionSemver Current version declaration in semantic versioning format (may be range).
@param {string} upgradedVersion Upgraded version.
@param {SemVer} upgradedVersionSemver Upgraded version in semantic versioning format.
@returns {boolean} Return true if the upgrade should be kept, otherwise it will be ignored.
@param {string} packageName The name of the dependency.
@param {string} current Current version declaration (may be a range).
@param {SemVer[]} currentSemver Current version declaration in semantic versioning format (may be a range).
@param {string} upgraded Upgraded version.
@param {SemVer} upgradedSemver Upgraded version in semantic versioning format.
@returns {boolean} Return true if the upgrade should be kept, otherwise it will be ignored.
*/
filterResults: (packageName, { currentVersion, currentVersionSemver, upgradedVersion, upgradedVersionSemver }) => {
const currentMajorVersion = currentVersionSemver?.[0]?.major
const upgradedMajorVersion = upgradedVersionSemver?.major
if (currentMajorVersion && upgradedMajorVersion) {
return currentMajorVersion < upgradedMajorVersion
filterResults: (packageName, { current, currentSemver, upgraded, upgradedSemver }) => {
const currentMajor = parseInt(currentSemver?.[0]?.major, 10)
const upgradedMajor = parseInt(upgradedSemver?.major, 10)
if (currentMajor && upgradedMajor) {
return currentMajor < upgradedMajor
}
return true
}
Expand Down Expand Up @@ -580,10 +580,11 @@ Determines the version to upgrade to. (default: "latest")
<table>
<tr><td>greatest</td><td>Upgrade to the highest version number published, regardless of release date or tag. Includes prereleases.</td></tr>
<tr><td>latest</td><td>Upgrade to whatever the package's "latest" git tag points to. Excludes pre is specified.</td></tr>
<tr><td>latest</td><td>Upgrade to whatever the package's "latest" git tag points to. Excludes prereleases unless --pre is specified.</td></tr>
<tr><td>minor</td><td>Upgrade to the highest minor version without bumping the major version.</td></tr>
<tr><td>newest</td><td>Upgrade to the version with the most recent publish date, even if there are other version numbers that are higher. Includes prereleases.</td></tr>
<tr><td>patch</td><td>Upgrade to the highest patch version without bumping the minor or major versions.</td></tr>
<tr><td>semver</td><td>Upgrade to the highest version within the semver range specified in your package.json.</td></tr>
<tr><td>@[tag]</td><td>Upgrade to the version published to a specific tag, e.g. 'next' or 'beta'.</td></tr>
</table>
Expand Down
Loading

0 comments on commit e2cb27a

Please sign in to comment.