Skip to content

Commit 4a5261e

Browse files
committed
Merge branch 'develop'
2 parents 81f41ce + f8f2ae8 commit 4a5261e

File tree

7 files changed

+48
-6
lines changed

7 files changed

+48
-6
lines changed

.all-contributorsrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
"avatar_url": "https://avatars.githubusercontent.com/u/523054?v=4",
7070
"profile": "https://github.com/9swampy",
7171
"contributions": [
72-
"bug"
72+
"bug",
73+
"code"
7374
]
7475
}
7576
],
@@ -81,4 +82,4 @@
8182
"skipCi": true,
8283
"commitConvention": "angular",
8384
"commitType": "docs"
84-
}
85+
}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.2.7](https://github.com/the-bugging/react-use-downloader/compare/v1.2.6...v1.2.7) (2024-04-16)
6+
57
### [1.2.6](https://github.com/the-bugging/react-use-downloader/compare/v1.2.5...v1.2.6) (2024-04-09)
68

79

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
123123
<td align="center" valign="top" width="14.28%"><a href="http://bzbetty.blogspot.com"><img src="https://avatars.githubusercontent.com/u/533131?v=4?s=100" width="100px;" alt="Sam "Betty" McKoy"/><br /><sub><b>Sam "Betty" McKoy</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3Abzbetty" title="Bug reports">🐛</a></td>
124124
<td align="center" valign="top" width="14.28%"><a href="https://github.com/peranosborn"><img src="https://avatars.githubusercontent.com/u/1318002?v=4?s=100" width="100px;" alt="Peran Osborn"/><br /><sub><b>Peran Osborn</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3Aperanosborn" title="Bug reports">🐛</a> <a href="#ideas-peranosborn" title="Ideas, Planning, & Feedback">🤔</a></td>
125125
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MarcosRS"><img src="https://avatars.githubusercontent.com/u/12486814?v=4?s=100" width="100px;" alt="Marcos"/><br /><sub><b>Marcos</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3AMarcosRS" title="Bug reports">🐛</a> <a href="#ideas-MarcosRS" title="Ideas, Planning, & Feedback">🤔</a></td>
126-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/9swampy"><img src="https://avatars.githubusercontent.com/u/523054?v=4?s=100" width="100px;" alt="9swampy"/><br /><sub><b>9swampy</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3A9swampy" title="Bug reports">🐛</a></td>
126+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/9swampy"><img src="https://avatars.githubusercontent.com/u/523054?v=4?s=100" width="100px;" alt="9swampy"/><br /><sub><b>9swampy</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3A9swampy" title="Bug reports">🐛</a> <a href="https://github.com/the-bugging/react-use-downloader/commits?author%3A9swampy" title="Code">💻</a></td>
127127
</tr>
128128
</tbody>
129129
</table>

clean.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* eslint-disable no-unused-vars */
2+
/* eslint-env node */
3+
"use strict";
4+
var fs = require("fs");
5+
6+
function deleteFolderRecursive(path) {
7+
if (fs.existsSync(path) && fs.lstatSync(path).isDirectory()) {
8+
fs.readdirSync(path).forEach(function (file, index) {
9+
var curPath = path + "/" + file;
10+
11+
if (fs.lstatSync(curPath).isDirectory()) {
12+
// recurse
13+
deleteFolderRecursive(curPath);
14+
} else {
15+
// delete file
16+
fs.unlinkSync(curPath);
17+
}
18+
});
19+
20+
console.log(`Deleting directory "${path}"...`);
21+
fs.rmdirSync(path);
22+
}
23+
}
24+
25+
console.log("Cleaning working tree...");
26+
27+
process.argv.forEach(function (val, index, array) {
28+
deleteFolderRecursive("./" + val);
29+
});
30+
31+
console.log("Successfully cleaned working tree!");

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-use-downloader",
3-
"version": "1.2.6",
3+
"version": "1.2.7",
44
"description": "Creates a download handler function and gives progress information",
55
"author": "Olavo Parno",
66
"license": "MIT",
@@ -29,7 +29,7 @@
2929
"scripts": {
3030
"test": "react-scripts test",
3131
"test:coverage": "npm run test -- --coverage --watchAll=false",
32-
"prebuild": "rm -rf dist",
32+
"prebuild": "node clean.js dist",
3333
"build": "rollup -c && tsc -d --emitDeclarationOnly --noEmit false --declarationDir dist",
3434
"start": "rollup -c -w",
3535
"prepare": "husky install",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {}
8+
}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ export default function useDownloader(
206206
}, timeout);
207207

208208
return fetch(downloadUrl, {
209-
...options,
210209
method: 'GET',
210+
...options,
211211
signal: fetchController.signal,
212212
})
213213
.then(resolverWithProgress)

0 commit comments

Comments
 (0)