-
Notifications
You must be signed in to change notification settings - Fork 2
patch: migrate to prebuilidify + flowzone + upgrade all deps #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| name: test release | ||
| # https://github.com/product-os/flowzone/tree/master/.github/actions | ||
| inputs: | ||
| json: | ||
| description: "JSON stringified object containing all the inputs from the calling workflow" | ||
| required: true | ||
| secrets: | ||
| description: "JSON stringified object containing all the secrets from the calling workflow" | ||
| required: true | ||
|
|
||
| # --- custom environment | ||
| NODE_VERSION: | ||
| type: string | ||
| default: "18.x" | ||
| VERBOSE: | ||
| type: string | ||
| default: "true" | ||
|
|
||
| runs: | ||
| # https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | ||
| using: "composite" | ||
| steps: | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3 | ||
| with: | ||
| node-version: ${{ inputs.NODE_VERSION }} | ||
| cache: npm | ||
|
|
||
| - name: Test release on windows | ||
| if: runner.os == 'Windows' | ||
| shell: pwsh | ||
| run: | | ||
| npm ci | ||
| npm run build | ||
| npm run test | ||
|
|
||
| - name: Test release on mac | ||
| if: runner.os != 'Windows' | ||
| shell: bash | ||
| run: | | ||
| npm ci | ||
| npm run build | ||
| npm run test |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Flowzone | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, closed] | ||
| branches: [main, master] | ||
| # allow external contributions to use secrets within trusted code | ||
| pull_request_target: | ||
| types: [opened, synchronize, closed] | ||
| branches: [main, master] | ||
|
|
||
| jobs: | ||
| flowzone: | ||
| name: Flowzone | ||
| uses: product-os/flowzone/.github/workflows/flowzone.yml@master | ||
| # prevent duplicate workflow executions for pull_request and pull_request_target | ||
| if: | | ||
| ( | ||
| github.event.pull_request.head.repo.full_name == github.repository && | ||
| github.event_name == 'pull_request' | ||
| ) || ( | ||
| github.event.pull_request.head.repo.full_name != github.repository && | ||
| github.event_name == 'pull_request_target' | ||
| ) | ||
|
|
||
| # Workflows in the same org or enterprise can use the inherit keyword to implicitly pass secrets | ||
| secrets: inherit | ||
| with: | ||
| custom_test_matrix: > | ||
| { | ||
| "os": [["windows-latest"], ["macos-latest"]] | ||
| } | ||
| restrict_custom_actions: false | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,81 +1,78 @@ | ||
| mountutils | ||
| ========== | ||
| # mountutils | ||
|
|
||
| [](https://npmjs.com/package/mountutils) | ||
| [](https://npmjs.com/package/mountutils) | ||
| [](https://npmjs.com/package/mountutils) | ||
| [](https://travis-ci.org/resin-io-modules/mountutils/branches) | ||
| [](https://ci.appveyor.com/project/resin-io/mountutils/branch/master) | ||
|
|
||
| > Cross platform mount related utilities | ||
|
|
||
| Installation | ||
| ------------ | ||
| ## Installation | ||
|
|
||
| Install `mountutils` by running: | ||
|
|
||
| ```sh | ||
| $ npm install --save mountutils | ||
| ``` | ||
|
|
||
| Debug mode | ||
| ---------- | ||
| ## Prebuild | ||
|
|
||
| This project contains cross-platform prebuild for node 18.18.2 and 20.5.1. | ||
|
|
||
| ## Debug mode | ||
|
|
||
| You can enable debug mode by setting the `MOUNTUTILS_DEBUG` environment | ||
| variable. | ||
|
|
||
| Documentation | ||
| ------------- | ||
| ## Documentation | ||
|
|
||
| <a name="module_mountutils.unmountDisk"></a> | ||
|
|
||
| ### mountutils.unmountDisk(device, callback) | ||
|
|
||
| **Kind**: static method of <code>[mountutils](#module_mountutils)</code> | ||
| **Summary**: Unmount a whole disk | ||
| **Access**: public | ||
| **Access**: public | ||
|
|
||
| | Param | Type | Description | | ||
| | --- | --- | --- | | ||
| | device | <code>String</code> | device | | ||
| | Param | Type | Description | | ||
| | -------- | --------------------- | ---------------- | | ||
| | device | <code>String</code> | device | | ||
| | callback | <code>function</code> | callback (error) | | ||
|
|
||
| **Example** | ||
| **Example** | ||
|
|
||
| ```js | ||
| // macOS | ||
| const drive = '/dev/disk2'; | ||
| const drive = "/dev/disk2"; | ||
|
|
||
| // GNU/Linux | ||
| const drive = '/dev/sdb'; | ||
| const drive = "/dev/sdb"; | ||
|
|
||
| // Windows | ||
| const drive = '\\\\.\\PHYSICALDRIVE2'; | ||
| const drive = "\\\\.\\PHYSICALDRIVE2"; | ||
|
|
||
| mountutils.unmountDisk(drive, (error) => { | ||
| if (error) { | ||
| throw error; | ||
| } | ||
|
|
||
| console.log('Done!'); | ||
| console.log("Done!"); | ||
| }); | ||
| ``` | ||
|
|
||
| Support | ||
| ------- | ||
| ## Support | ||
|
|
||
| If you're having any problem, please [raise an issue][newissue] on GitHub and | ||
| the Resin.io team will be happy to help. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be worth updating this to say Balena instead of Resin.io 😆
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will do in another PR |
||
|
|
||
| Tests | ||
| ----- | ||
| ## Tests | ||
|
|
||
| Run the test suite by doing: | ||
|
|
||
| ```sh | ||
| $ npm test | ||
| ``` | ||
|
|
||
| Troubleshooting | ||
| --------------- | ||
| ## Troubleshooting | ||
|
|
||
| ### `error C2373: '__pfnDliNotifyHook2': redefinition` | ||
|
|
||
|
|
@@ -88,8 +85,7 @@ npm install -g npm@latest | |
|
|
||
| See the [following `node-gyp` issue](https://github.com/nodejs/node-gyp/issues/972) for more details. | ||
|
|
||
| Contribute | ||
| ---------- | ||
| ## Contribute | ||
|
|
||
| - Issue Tracker: [github.com/resin-io-modules/mountutils/issues][issues] | ||
| - Source Code: [github.com/resin-io-modules/mountutils][source] | ||
|
Comment on lines
90
to
91
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And I guess these URLs need updating too!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
|
|
@@ -105,8 +101,7 @@ linters run without any warning: | |
| $ npm run lint | ||
| ``` | ||
|
|
||
| License | ||
| ------- | ||
| ## License | ||
|
|
||
| The project is licensed under the Apache 2.0 license. | ||
|
|
||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,4 +63,7 @@ | |
| ], | ||
| } | ||
| ], | ||
| 'variables' : { | ||
| 'openssl_fips': '', | ||
| }, | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this needs some changes to continue testing on mac/windows, cc @klutchell ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Page- Flowzone still doesn't support npm tests on macos or windows, it hasn't really been a priority. It needs to be done via custom actions like we did here:
https://github.com/balena-io-modules/winusb-driver-generator/blob/master/.github/workflows/flowzone.yml
https://github.com/balena-io-modules/winusb-driver-generator/blob/master/.github/actions/test/action.yml
I would like to add multiple OS support to npm checks in Flowzone, but it complicates our testing matrix quite a bit and I don't want to slow down the pre-checks. We can open a research/project if it's worth looking into further.