microsoft / winget-dsc

MIT License
24 stars 14 forks source link

Add whatif and export support NpmDsc #132

Open Gijsreyn opened 1 week ago

Gijsreyn commented 1 week ago

Addresses export and whatif support for NpmDsc.

Microsoft Reviewers: Open in CodeFlow
github-actions[bot] commented 1 week ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (5)

ADDLOCAL Hmmss MMdd msiexec nois

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:Gijsreyn/winget-dsc.git](https://github.com/Gijsreyn/winget-dsc.git) repository on the `whatif-support-npm` branch ([:information_source: how do I use this?]( https://docs.check-spelling.dev/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.24/apply.pl' | perl - 'https://github.com/microsoft/winget-dsc/actions/runs/11868779067/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
github-actions[bot] commented 1 week ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (5)

ADDLOCAL Hmmss MMdd msiexec nois

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:Gijsreyn/winget-dsc.git](https://github.com/Gijsreyn/winget-dsc.git) repository on the `whatif-support-npm` branch ([:information_source: how do I use this?]( https://docs.check-spelling.dev/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.24/apply.pl' | perl - 'https://github.com/microsoft/winget-dsc/actions/runs/11868793763/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
github-actions[bot] commented 1 week ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (1)

ADDLOCAL

These words are not needed and should be removed markdownlint

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands ... in a clone of the [git@github.com:Gijsreyn/winget-dsc.git](https://github.com/Gijsreyn/winget-dsc.git) repository on the `whatif-support-npm` branch ([:information_source: how do I use this?]( https://docs.check-spelling.dev/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.24/apply.pl' | perl - 'https://github.com/microsoft/winget-dsc/actions/runs/11868801245/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
Gijsreyn commented 1 week ago

Hey @ryfu-msft. I liked to work on NPM and wanted to expand a bit on it. I've made some updates that I believe will enhance its functionality. Could you please review my pull request and share your feedback? Thanks!

ryfu-msft commented 5 days ago

/azp run

azure-pipelines[bot] commented 5 days ago
Azure Pipelines successfully started running 1 pipeline(s).
Gijsreyn commented 4 days ago

Thanks for the run Ryan, can you please run it once again? I added some debug line to see if there is actual result. It's pretty strange, because when I ran it locally, it succeeded.

image

ryfu-msft commented 4 days ago

/azp run

azure-pipelines[bot] commented 4 days ago
Azure Pipelines successfully started running 1 pipeline(s).
Gijsreyn commented 3 days ago

I couldn't really make sense why it was not working, until I started running it under my own Azure Pipelines agents. After tremendous debugging, I rewrote the logic to determine the paths to look for. To reduce the calling to npm, I have included one hardcoded path. If that is not found, it will attempt to use the npm cache list to find it. Now I can see the following:

image

Can you give it another go @ryfu-msft ? Thanks in advance!

ryfu-msft commented 13 minutes ago

/azp run

azure-pipelines[bot] commented 13 minutes ago
Azure Pipelines successfully started running 1 pipeline(s).