@zairakai/js-dev-tools 3.12.1 → 3.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zairakai/js-dev-tools",
3
- "version": "3.12.1",
3
+ "version": "3.12.2",
4
4
  "description": "The unified and centralized development toolkit for JavaScript/TypeScript projects - ESLint, Prettier, Stylelint, Knip, Vitest, Git Hooks, and GitLab CI pipeline templates",
5
5
  "keywords": [
6
6
  "dev-tools",
@@ -610,10 +610,16 @@ async function update(config) {
610
610
  const before = cooldownDate(config.cooldown)
611
611
  const names = refreshableNames(JSON.parse(readFileSync('package-lock.json', 'utf8')))
612
612
 
613
- if (urgent || null === before) {
614
- run('npm', ['update', '--no-audit', '--no-fund'])
615
- } else if (0 < names.length) {
616
- run('npm', ['update', '--no-audit', '--no-fund', `--before=${before.toISOString()}`, ...names])
613
+ // The refresh is a bonus: when npm cannot respect the cooling date (a range that starts at a version younger than
614
+ // the period, after an urgent update), it waits for the next run and the update goes on.
615
+ try {
616
+ if (urgent || null === before) {
617
+ run('npm', ['update', '--no-audit', '--no-fund'])
618
+ } else if (0 < names.length) {
619
+ run('npm', ['update', '--no-audit', '--no-fund', `--before=${before.toISOString()}`, ...names])
620
+ }
621
+ } catch (error) {
622
+ log(`The lock file is not refreshed this time: ${secret(error.message).split('\n')[0]}`)
617
623
  }
618
624
 
619
625
  if (urgent) {