Skip to content

Commit 930f5c8

Browse files
committed
complete overhaul see CHANGELOG for details
1 parent 4eb32b2 commit 930f5c8

24 files changed

+542
-480
lines changed

.conf/eslint/eslint.config.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
const js = require( "@eslint/js" );
22
const globals = require( "globals" );
33

4-
const BROWSER_FIX = Object.assign({ }, globals.browser, {
5-
AudioWorkletGlobalScope: globals.browser[ 'AudioWorkletGlobalScope ' ]
6-
});
7-
8-
delete BROWSER_FIX[ 'AudioWorkletGlobalScope ' ];
9-
104
module.exports = [
115
js.configs.recommended,
126
{
137
languageOptions: {
148
globals: {
15-
...globals.es6,
169
...globals.node,
17-
...BROWSER_FIX
10+
...globals.browser
1811
},
1912
parserOptions: {
20-
ecmaVersion: 2018,
13+
ecmaVersion: 2023,
2114
sourceType: "module"
2215
},
2316
},

.conf/grunt/check_outdated.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT license.
44
*/
55

6+
// THIS IS A TEST CONFIGURATION. DO NOT CHANGE.
67
module.exports = function ( grunt, options ) {
78
return {
89
target1: {

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [20.x]
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Run tests including coverage
29+
run: grunt test
30+
31+
- name: Build
32+
run: grunt build
33+
34+
- name: Upload coverage reports to Codecov
35+
uses: codecov/codecov-action@v5
36+
with:
37+
token: ${{ secrets.CODECOV_TOKEN }}
38+
files: ./dist/coverage/lcov.info

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release → npm
2+
3+
# Trigger workflow on a new release or manual dispatch
4+
on:
5+
release:
6+
types: [published]
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# 1️⃣ Checkout the repository
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
# 2️⃣ Setup Node.js
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
registry-url: https://registry.npmjs.org/
24+
25+
# 3️⃣ Install dependencies
26+
- name: Install dependencies
27+
run: npm install
28+
29+
# 4️⃣ Run tests using Grunt
30+
- name: Run grunt
31+
run: grunt
32+
33+
# 5️⃣ Publish package to npm from build directory (e.g., 'dist')
34+
- name: Publish to npm
35+
run: npm publish ./build
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ All notable changes to this project will be documented in this file.
1212

1313
- No Fixes yet
1414

15+
## [1.3.0] - 2026-01-22
16+
17+
### Changed
18+
19+
- Complete overhaul of the `grunt-check-outdated` plugin
20+
- Rewrote all core modules (`lib/constants.js`, `lib/index.js`, `lib/options/*`, `lib/tasks/*`)
21+
- Converted all asynchronous code to use `async/await` consistently
22+
- Replaced Promise chains in `toArgs`, `execute`, and `runTask`
23+
- Introduced `structuredClone` in `toArgs` to safely clone optional task options
24+
- Standardized JSDoc comments for all modules and functions
25+
- Headers unified across all source files
26+
- Updated tests to match new async structure; 100% coverage maintained
27+
- Improved documentation links and references for jsdoc2md generation
28+
1529
## [1.2.0] - 2024-07-01
1630

1731
Updated dependencies (versions) in package.json

docs/api.index.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
## Modules
33

44
* [grunt-check-outdated](api.md/index.md#module_grunt-check-outdated)
5-
* [.registerMultiTaskChkOutdated(grunt)](api.md/index.md#module_grunt-check-outdated.registerMultiTaskChkOutdated)
65
* [grunt-check-outdated/constants](api.md/constants.md#module_grunt-check-outdated/constants)
6+
* [.TASKNAME](api.md/constants.md#module_grunt-check-outdated/constants.TASKNAME) : <code>string</code>
7+
* [.TASKDESCRIPTION](api.md/constants.md#module_grunt-check-outdated/constants.TASKDESCRIPTION) : <code>string</code>
78
* [grunt-check-outdated/options](api.md/options/index.md#module_grunt-check-outdated/options)
89
* [.toArgs(grunt, task)](api.md/options/index.md#module_grunt-check-outdated/options.toArgs) ⇒ <code>Promise.&lt;Object&gt;</code> \| <code>Array.&lt;strings&gt;</code> \| <code>Array.&lt;any&gt;</code>
910
* [grunt-check-outdated/options/checkoutdated](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated)
10-
* [~getCheckOutdatedPath(grunt)](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated..getCheckOutdatedPath) ⇒ <code>string</code>
11-
* [~getChkOutdatedOptions()](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated..getChkOutdatedOptions) ⇒ <code>object</code>
12-
* [~getChkOutdatedIgnoreOptions()](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated..getChkOutdatedIgnoreOptions) ⇒ <code>object</code>
13-
* [~getOptions()](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated..getOptions) ⇒ <code>Object</code>
14-
* [~getTaskOptions(task)](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated..getTaskOptions) ⇒ <code>Object</code>
15-
* [~toArgs(grunt, task)](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated..toArgs) ⇒ <code>Promise.&lt;Array.&lt;Object&gt;&gt;</code>
11+
* [.getCheckOutdatedPath(grunt)](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated.getCheckOutdatedPath) ⇒ <code>string</code>
12+
* [.getChkOutdatedOptions()](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated.getChkOutdatedOptions) ⇒ <code>object</code>
13+
* [.getChkOutdatedIgnoreOptions()](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated.getChkOutdatedIgnoreOptions) ⇒ <code>object</code>
14+
* [.getOptions()](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated.getOptions) ⇒ <code>Object</code>
15+
* [.getTaskOptions(task)](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated.getTaskOptions) ⇒ <code>Object</code>
16+
* [.toArgs(grunt, task)](api.md/options/checkoutdated.md#module_grunt-check-outdated/options/checkoutdated.toArgs) ⇒ <code>Promise.&lt;Array.&lt;Object&gt;&gt;</code>
1617
* [grunt-check-outdated/tasks](api.md/tasks/index.md#module_grunt-check-outdated/tasks)
17-
* [.registerMultiTaskChkOutdated(grunt)](api.md/tasks/index.md#module_grunt-check-outdated/tasks.registerMultiTaskChkOutdated)
18+
* [.registerMultiTask(grunt)](api.md/tasks/index.md#module_grunt-check-outdated/tasks.registerMultiTask)
1819
* [grunt-check-outdated/tasks/checkoutdated](api.md/tasks/checkoutdated.md#module_grunt-check-outdated/tasks/checkoutdated)
19-
* [~executeChkOutdated(grunt, task, obj)](api.md/tasks/checkoutdated.md#module_grunt-check-outdated/tasks/checkoutdated..executeChkOutdated)
20-
* [~runTaskChkOutdated()](api.md/tasks/checkoutdated.md#module_grunt-check-outdated/tasks/checkoutdated..runTaskChkOutdated) ⇒ <code>Promise</code>
21-
* [~registerMultiTaskChkOutdated(grunt)](api.md/tasks/checkoutdated.md#module_grunt-check-outdated/tasks/checkoutdated..registerMultiTaskChkOutdated)
20+
* [.execute(grunt, task, obj)](api.md/tasks/checkoutdated.md#module_grunt-check-outdated/tasks/checkoutdated.execute)
21+
* [.runTask()](api.md/tasks/checkoutdated.md#module_grunt-check-outdated/tasks/checkoutdated.runTask) ⇒ <code>Promise</code>
22+
* [.registerMultiTask(grunt)](api.md/tasks/checkoutdated.md#module_grunt-check-outdated/tasks/checkoutdated.registerMultiTask)

docs/api.md/constants.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,24 @@
22
<br><a name="module_grunt-check-outdated/constants"></a>
33

44
## grunt-check-outdated/constants
5-
> constants.js: grunt-check-outdated
5+
> lib/constants.js: grunt-check-outdated
66
7+
8+
* [grunt-check-outdated/constants](#module_grunt-check-outdated/constants)
9+
* [.TASKNAME](#module_grunt-check-outdated/constants.TASKNAME) : <code>string</code>
10+
* [.TASKDESCRIPTION](#module_grunt-check-outdated/constants.TASKDESCRIPTION) : <code>string</code>
11+
12+
13+
<br><a name="module_grunt-check-outdated/constants.TASKNAME"></a>
14+
15+
### grunt-check-outdated/constants.TASKNAME : <code>string</code>
16+
> The task name used to register the 'check_outdated' multitask.
17+
18+
**Default**: <code>&quot;check_outdated&quot;</code>
19+
20+
<br><a name="module_grunt-check-outdated/constants.TASKDESCRIPTION"></a>
21+
22+
### grunt-check-outdated/constants.TASKDESCRIPTION : <code>string</code>
23+
> The description used for the 'check_outdated' multitask.
24+
25+
**Default**: <code>&quot;Run check outdated from grunt.&quot;</code>

docs/api.md/index.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,3 @@
44
## grunt-check-outdated
55
> Package interface of grunt-check-outdated<br />> All static members of this module are available for 3rd party access.
66
7-
8-
<br><a name="module_grunt-check-outdated.registerMultiTaskChkOutdated"></a>
9-
10-
### grunt-check-outdated.registerMultiTaskChkOutdated(grunt)
11-
> Register a multitask for check_outdated.
12-
13-
**See**: Function [registerMultiTaskChkOutdated](tasks/index.md#.registerMultiTaskChkOutdated) published by module tasks for a detailed function description.
14-
15-
| Param | Type |
16-
| --- | --- |
17-
| grunt | <code>grunt</code> |
18-

docs/api.md/options/checkoutdated.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
77

88
* [grunt-check-outdated/options/checkoutdated](#module_grunt-check-outdated/options/checkoutdated)
9-
* [~getCheckOutdatedPath(grunt)](#module_grunt-check-outdated/options/checkoutdated..getCheckOutdatedPath) ⇒ <code>string</code>
10-
* [~getChkOutdatedOptions()](#module_grunt-check-outdated/options/checkoutdated..getChkOutdatedOptions) ⇒ <code>object</code>
11-
* [~getChkOutdatedIgnoreOptions()](#module_grunt-check-outdated/options/checkoutdated..getChkOutdatedIgnoreOptions) ⇒ <code>object</code>
12-
* [~getOptions()](#module_grunt-check-outdated/options/checkoutdated..getOptions) ⇒ <code>Object</code>
13-
* [~getTaskOptions(task)](#module_grunt-check-outdated/options/checkoutdated..getTaskOptions) ⇒ <code>Object</code>
14-
* [~toArgs(grunt, task)](#module_grunt-check-outdated/options/checkoutdated..toArgs) ⇒ <code>Promise.&lt;Array.&lt;Object&gt;&gt;</code>
9+
* [.getCheckOutdatedPath(grunt)](#module_grunt-check-outdated/options/checkoutdated.getCheckOutdatedPath) ⇒ <code>string</code>
10+
* [.getChkOutdatedOptions()](#module_grunt-check-outdated/options/checkoutdated.getChkOutdatedOptions) ⇒ <code>object</code>
11+
* [.getChkOutdatedIgnoreOptions()](#module_grunt-check-outdated/options/checkoutdated.getChkOutdatedIgnoreOptions) ⇒ <code>object</code>
12+
* [.getOptions()](#module_grunt-check-outdated/options/checkoutdated.getOptions) ⇒ <code>Object</code>
13+
* [.getTaskOptions(task)](#module_grunt-check-outdated/options/checkoutdated.getTaskOptions) ⇒ <code>Object</code>
14+
* [.toArgs(grunt, task)](#module_grunt-check-outdated/options/checkoutdated.toArgs) ⇒ <code>Promise.&lt;Array.&lt;Object&gt;&gt;</code>
1515

1616

17-
<br><a name="module_grunt-check-outdated/options/checkoutdated..getCheckOutdatedPath"></a>
17+
<br><a name="module_grunt-check-outdated/options/checkoutdated.getCheckOutdatedPath"></a>
1818

19-
### grunt-check-outdated/options/checkoutdated~getCheckOutdatedPath(grunt) ⇒ <code>string</code>
19+
### grunt-check-outdated/options/checkoutdated.getCheckOutdatedPath(grunt) ⇒ <code>string</code>
2020
> Returns the path to the check-outdated
2121
2222
**Returns**: <code>string</code> - path to check-outdated
@@ -26,30 +26,30 @@
2626
| grunt | <code>grunt</code> |
2727

2828

29-
<br><a name="module_grunt-check-outdated/options/checkoutdated..getChkOutdatedOptions"></a>
29+
<br><a name="module_grunt-check-outdated/options/checkoutdated.getChkOutdatedOptions"></a>
3030

31-
### grunt-check-outdated/options/checkoutdated~getChkOutdatedOptions() ⇒ <code>object</code>
31+
### grunt-check-outdated/options/checkoutdated.getChkOutdatedOptions() ⇒ <code>object</code>
3232
> Returns default settings for basic check-outdated options.
3333
3434
**Returns**: <code>object</code> - default settings for basic check-outdated options.
3535

36-
<br><a name="module_grunt-check-outdated/options/checkoutdated..getChkOutdatedIgnoreOptions"></a>
36+
<br><a name="module_grunt-check-outdated/options/checkoutdated.getChkOutdatedIgnoreOptions"></a>
3737

38-
### grunt-check-outdated/options/checkoutdated~getChkOutdatedIgnoreOptions() ⇒ <code>object</code>
38+
### grunt-check-outdated/options/checkoutdated.getChkOutdatedIgnoreOptions() ⇒ <code>object</code>
3939
> Returns default settings for basic check-outdated ignore options.
4040
4141
**Returns**: <code>object</code> - default settings for basic check-outdated ignore options.
4242

43-
<br><a name="module_grunt-check-outdated/options/checkoutdated..getOptions"></a>
43+
<br><a name="module_grunt-check-outdated/options/checkoutdated.getOptions"></a>
4444

45-
### grunt-check-outdated/options/checkoutdated~getOptions() ⇒ <code>Object</code>
45+
### grunt-check-outdated/options/checkoutdated.getOptions() ⇒ <code>Object</code>
4646
> Defines and returns the set of options that is passed to task 'check_outdated'.
4747
4848
**Returns**: <code>Object</code> - check_outdated default options
4949

50-
<br><a name="module_grunt-check-outdated/options/checkoutdated..getTaskOptions"></a>
50+
<br><a name="module_grunt-check-outdated/options/checkoutdated.getTaskOptions"></a>
5151

52-
### grunt-check-outdated/options/checkoutdated~getTaskOptions(task) ⇒ <code>Object</code>
52+
### grunt-check-outdated/options/checkoutdated.getTaskOptions(task) ⇒ <code>Object</code>
5353
> Returns grunt task specific options for 'check_outdated'.> Note: 'check_outdated' default options and configuration options> have already been merged!
5454
5555
**Returns**: <code>Object</code> - 'check_outdated' options for grunt task
@@ -59,9 +59,9 @@
5959
| task | <code>grunt.task</code> |
6060

6161

62-
<br><a name="module_grunt-check-outdated/options/checkoutdated..toArgs"></a>
62+
<br><a name="module_grunt-check-outdated/options/checkoutdated.toArgs"></a>
6363

64-
### grunt-check-outdated/options/checkoutdated~toArgs(grunt, task) ⇒ <code>Promise.&lt;Array.&lt;Object&gt;&gt;</code>
64+
### grunt-check-outdated/options/checkoutdated.toArgs(grunt, task) ⇒ <code>Promise.&lt;Array.&lt;Object&gt;&gt;</code>
6565
> Convert grunt task specific options for 'check_outdated' to an array> of arguments, which will be used for calling check-outdated.
6666
6767
**Returns**: <code>Promise.&lt;Array.&lt;Object&gt;&gt;</code> - { args, opts }

docs/api.md/options/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
<br><a name="module_grunt-check-outdated/options"></a>
33

44
## grunt-check-outdated/options
5-
> index.js: grunt-check-outdated/options
5+
> lib/options/index.js: grunt-check-outdated/options
66
77

88
<br><a name="module_grunt-check-outdated/options.toArgs"></a>
99

1010
### grunt-check-outdated/options.toArgs(grunt, task) ⇒ <code>Promise.&lt;Object&gt;</code> \| <code>Array.&lt;strings&gt;</code> \| <code>Array.&lt;any&gt;</code>
11-
> Register a multitask for check_outdated.
11+
> Converts task-specific options for the `check_outdated` task into> a plain options object used for executing Rollup.> > This is a re-export of function [toArgs](chkoutdated.md#.toArgs)> published by module [options/chkoutdated](chkoutdated.md)
1212
1313
**Returns**: <code>Promise.&lt;Object&gt;</code> - obj<code>Array.&lt;strings&gt;</code> - obj.args an array of arguments<code>Array.&lt;any&gt;</code> - obj.opts an array of options
14-
**See**: Function [toArgs](chkoutdated.md#.toArgs) published by module chkoutdated for a detailed function description.
1514

1615
| Param | Type |
1716
| --- | --- |

0 commit comments

Comments
 (0)