Skip to content

Commit 66258f8

Browse files
authored
Fix encoding issue (backport logic from main module) (#22)
1 parent 45788d9 commit 66258f8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SaveResourceToExistingDirectoryPlugin {
1616
registerAction('saveResource', async ({resource}) => {
1717
const filename = path.join(absoluteDirectoryPath, resource.getFilename());
1818
const text = resource.getText();
19-
await fs.outputFile(filename, text, { encoding: 'binary' });
19+
await fs.outputFile(filename, text, { encoding: resource.getEncoding() });
2020
loadedResources.push(resource);
2121
});
2222
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
"chai": "^4.2.0",
3333
"eslint": "^8.5.0",
3434
"mocha": "^10.0.0",
35-
"website-scraper": "^5.0.0"
35+
"website-scraper": "^5.2.0"
3636
},
3737
"peerDependencies": {
38-
"website-scraper": "^5.0.0"
38+
"website-scraper": "^5.2.0"
3939
},
4040
"files": [
4141
"index.js"

0 commit comments

Comments
 (0)