Skip to content
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

chore(get): refactor implementation #1025

Merged
merged 8 commits into from
Feb 3, 2024
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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ nwbuild({
- A commit's first line should be formatted as `<type>[optional scope]: <description>`.
- A commit's body should have a description of changes in bullet points followed by any links it references or issues it fixes or closes. It may include an optional `Notes: ...` section to provide additional context on why the PR is being merged when it doesn't seem like it should.
- Google's Release Please Action is used to update the changelog, bump the package version and generate GitHub releases.
- NPM Publish Action publishes to `npm` if there is a version bump.

## Roadmap

Expand All @@ -297,8 +298,9 @@ nwbuild({
### Chores

- chore(cli): migrate from `yargs` to `commander`
- chore(get): investigate [how symlinks are identified](https://github.com/overlookmotel/yauzl-promise/issues/39) and remove the workaround where they are created manually
- chore(get): verify sha checksum for downloads
- chore(util): factor out file paths as constant variables
- chore: annotate file paths as `fs.PathLike` instead of `string`.
- chore(bld): factor out core build step
- chore(bld): factor out linux config
- chore(bld): factor out macos config
Expand All @@ -307,6 +309,7 @@ nwbuild({
- chore(bld): factor out compressing
- chore(bld): factor out managed manifest
- chore(bld): move `.desktop` entry file logic to `create-desktop-shortcuts` package
- chore(util): factor out file paths as constant variables

## FAQ

Expand Down
232 changes: 0 additions & 232 deletions src/get.js

This file was deleted.

5 changes: 2 additions & 3 deletions src/get/decompress.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@ export default async function decompress(filePath, cacheDir) {
* @param {string} cacheDir - directory to unzip in
* @return {Promise<void>}
*/
export async function unzip(zippedFile, cacheDir) {
async function unzip(zippedFile, cacheDir) {
await unzipInternal(zippedFile, cacheDir, false).then(() => {
unzipInternal(zippedFile, cacheDir, true);
})
}

/**
* Method for unzip with symlink in theoretical
* Method for unzip with symlink. Workaround for not being able to handle symlinks. Tracking in linked issue.
*
* @async
* @function
* @param unzipSymlink
* @param {string} zippedFile - file path to .zip file
* @param {string} cacheDir - directory to unzip in
* @param {boolean} unzipSymlink - Using or not symlink
Expand Down
Loading
Loading