Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "."
schedule:
interval: "monthly"
versioning-strategy: increase
groups:
npm:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: ".github/workflows"
schedule:
interval: "monthly"
groups:
gha:
patterns:
- "*"
14 changes: 14 additions & 0 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"packages": {
".": {
"include-component-in-tag": false,
"release-type": "node",
"changelog-sections": [
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "chore", "section": "Chores", "hidden": false }
]
}
}
}

3 changes: 3 additions & 0 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.0"
}
44 changes: 44 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: cd

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
publish:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.1
with:
fetch-depth: 0

- id: release
uses: googleapis/release-please-action@v4.4.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json

- uses: actions/setup-node@v6.1.0
if: ${{ steps.release.outputs.release_created }}
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- run: npm install -g npm@latest
if: ${{ steps.release.outputs.release_created }}

- run: npm ci
if: ${{ steps.release.outputs.release_created }}

- run: npm run type
if: ${{ steps.release.outputs.release_created }}

- run: npm publish --tag latest --provenance --access public
if: ${{ steps.release.outputs.release_created }}
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: ci

on:
pull_request:
branches:
- main

permissions:
contents: read
pull-requests: write

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
test:
strategy:
matrix:
os:
- macos-15
- ubuntu-24.04
- windows-2025
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v6.0.1

- name: Setup Volta
uses: volta-cli/action@v4.2.1

- name: Install dependencies
run: npm ci

- name: Check for linting errors
run: npm run lint

- name: Run tests with coverage
id: coverage
shell: bash
run: |
{ npm t || true; } \
| sed 's/\x1b\[[0-9;]*m//g' \
| awk '
/start of coverage report/ {printing=1; next}
/end of coverage report/ {printing=0}
printing
' > coverage.txt

echo "COVERAGE<<EOF" >> $GITHUB_OUTPUT
cat coverage.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Convert coverage to markdown
id: markdown
shell: bash
run: |
{
echo "### 📊 Coverage Report — ${{ matrix.os }}"
echo
echo "| File | Line % | Branch % | Funcs % | Uncovered Lines |"
echo "|------|--------|----------|---------|------------------|"
grep '|' coverage.txt | \
grep -vE "file\s*\|\s*line|----" | \
while read -r line; do
clean=$(echo "$line" | sed 's/^ℹ\s*//' | tr -s ' ')
echo "| ${clean// | / | } |"
done
echo
} > coverage.md

echo "MARKDOWN<<EOF" >> $GITHUB_OUTPUT
cat coverage.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Comment on PR
uses: marocchino/sticky-pull-request-comment@v2
with:
key: coverage-${{ matrix.os }}
header: "Coverage Report – ${{ matrix.os }}"
message: ${{ steps.markdown.outputs.MARKDOWN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#runtime
node_modules

#package
cache
85 changes: 85 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Changelog

## [0.2.0](https://github.com/nwutils/getter/compare/v0.1.6...v0.2.0) (2026-01-18)


### Features

* support file protocol for options.manifestUrl ([#14](https://github.com/nwutils/getter/issues/14)) ([76b00d4](https://github.com/nwutils/getter/commit/76b00d4379f38644329c81ef264d5e67ce427425))


### Bug Fixes

* **deps:** security update for node-tar ([#12](https://github.com/nwutils/getter/issues/12)) ([28f991f](https://github.com/nwutils/getter/commit/28f991f89b51ffc98ab1d0fcc82298ac9496b322))


### Chores

* lint jsdoc comments ([96d71c2](https://github.com/nwutils/getter/commit/96d71c2fcb9da06bd616b71c5b5d97d62550c888))

## [0.1.6](https://github.com/nwutils/getter/compare/v0.1.5...v0.1.6) (2026-01-17)


### Bug Fixes

* return NW.js file path ([#9](https://github.com/nwutils/getter/issues/9)) ([3589c17](https://github.com/nwutils/getter/commit/3589c173df07b49698c7ef2899608920f5b37771))


### Chores

* **dependabot:** daily -&gt; monthly ([97deb87](https://github.com/nwutils/getter/commit/97deb8756dc1733dcba43f4830a5a9b1c2f337ab))
* **test:** cover http request logic ([#11](https://github.com/nwutils/getter/issues/11)) ([97674b1](https://github.com/nwutils/getter/commit/97674b1243d26e44c151cc259a1375d44d3d677f))

## [0.1.5](https://github.com/nwutils/getter/compare/v0.1.4...v0.1.5) (2025-11-30)


### Chores

* enable OIDC ([a8aa7df](https://github.com/nwutils/getter/commit/a8aa7dfbafff961f9b5f3f95d6592e207f039739))

## [0.1.4](https://github.com/nwutils/getter/compare/v0.1.3...v0.1.4) (2025-11-30)


### Chores

* **ci:** update npm to latest before publishing ([81eaad3](https://github.com/nwutils/getter/commit/81eaad34a778b2d6fdb6df241d6329ec9a953d98))

## [0.1.3](https://github.com/nwutils/getter/compare/v0.1.2...v0.1.3) (2025-11-30)


### Chores

* **ci:** add id: release ([c7d9c1c](https://github.com/nwutils/getter/commit/c7d9c1c1182682ee547cda1e3a3da729193b1904))

## [0.1.2](https://github.com/nwutils/getter/compare/v0.1.1...v0.1.2) (2025-11-30)


### Bug Fixes

* adopt inversion of control ([#2](https://github.com/nwutils/getter/issues/2)) ([8f87b29](https://github.com/nwutils/getter/commit/8f87b2955e9b939274d2bf0ad8f9f6e25164ae7f))


### Chores

* **ci:** merge publish into release ([de9dc94](https://github.com/nwutils/getter/commit/de9dc94bb13b3dc061db8b9909ad80650fba307f))
* **ci:** set fetch-depth to 0 ([9aa6690](https://github.com/nwutils/getter/commit/9aa66909fe30fa22abe6a5c69bddf1515f17b7c1))
* **ci:** trigger publish job on release event ([a90974e](https://github.com/nwutils/getter/commit/a90974eecc9fa8aad4b1d083d6b0b0746bd53762))
* **ci:** try trigger npm publish on release.types == published event ([d427207](https://github.com/nwutils/getter/commit/d42720747f47659e84f31762487512efc767ecca))
* **deps:** configure Dependabot ([0e0a0bf](https://github.com/nwutils/getter/commit/0e0a0bf838e9f9078c1749cb012cfd0142d75de8))
* **main:** release 0.1.1 ([#4](https://github.com/nwutils/getter/issues/4)) ([fa46f38](https://github.com/nwutils/getter/commit/fa46f38f00aff479e1e6138f6c9b89153ccd1225))
* migrate from nw-builder ([f78b3d9](https://github.com/nwutils/getter/commit/f78b3d9aa075c740197cbe1f832a8a4b5eb9d8eb))
* **release-please:** remove last-release-sha ([b7cdf68](https://github.com/nwutils/getter/commit/b7cdf68639251504e719f4cdd4a9a2a2f04e1ae2))

## [0.1.1](https://github.com/nwutils/getter/compare/v0.1.0...v0.1.1) (2025-11-30)


### Bug Fixes

* adopt inversion of control ([#2](https://github.com/nwutils/getter/issues/2)) ([8f87b29](https://github.com/nwutils/getter/commit/8f87b2955e9b939274d2bf0ad8f9f6e25164ae7f))


### Chores

* **ci:** trigger publish job on release event ([a90974e](https://github.com/nwutils/getter/commit/a90974eecc9fa8aad4b1d083d6b0b0746bd53762))
* **deps:** configure Dependabot ([0e0a0bf](https://github.com/nwutils/getter/commit/0e0a0bf838e9f9078c1749cb012cfd0142d75de8))
* migrate from nw-builder ([f78b3d9](https://github.com/nwutils/getter/commit/f78b3d9aa075c740197cbe1f832a8a4b5eb9d8eb))
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2025 Ayushman Chhabra

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![npm](https://img.shields.io/npm/v/@nwutils/runner/latest)](https://www.npmjs.com/package/@nwutils/runner/v/latest)

Download NW.js and related binaries for Linux, MacOS and Windows.
Run NW.js on Linux, MacOS and Windows hosts.

## Getting Started

Expand All @@ -14,13 +14,17 @@ Download NW.js and related binaries for Linux, MacOS and Windows.
```js
import run from "@nwutils/runner";

await get({
const nwProcess = await run({
version: "latest",
flavor: "normal",
platform: "linux",
arch: "x64",
srcDir: "./src",
cacheDir: "./cache",
argv: [],
});

nwProcess.kill();
```

## API Reference
Expand Down
19 changes: 19 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import js from "@eslint/js";
import { defineConfig } from "eslint/config";
import jsdoc from "eslint-plugin-jsdoc";
import globals from "globals";

export default defineConfig([
{
files: ["**/*.{js,mjs,cjs}"],
plugins: {
jsdoc,
},
languageOptions: {
globals: globals.node,
},
rules: {
...js.configs.recommended.rules,
},
},
]);
Loading
Loading