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

feat: Replace fd-slicer dependency with fd-slicer2 fork #1

Merged
merged 3 commits into from
Feb 24, 2023
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
18 changes: 18 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI

on:
push:
branches: [ master ]

pull_request:
branches: [ master ]

workflow_dispatch: {}

jobs:
Job:
name: Node.js
uses: artusjs/github-actions/.github/workflows/node-test.yml@v1
with:
os: 'ubuntu-latest, macos-latest'
version: '8, 10, 12, 14, 16, 18'
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release

on:
push:
branches: [ master ]

workflow_dispatch: {}

jobs:
release:
name: Node.js
uses: artusjs/github-actions/.github/workflows/node-release.yml@v1
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
with:
checkTest: false
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require("fs");
var zlib = require("zlib");
var fd_slicer = require("fd-slicer");
var fd_slicer = require("fd-slicer2");
var crc32 = require("buffer-crc32");
var util = require("util");
var EventEmitter = require("events").EventEmitter;
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "yauzl",
"name": "yauzl2",
"version": "2.10.0",
"description": "yet another unzip library for node",
"main": "index.js",
"scripts": {
"test": "node test/test.js",
"test-cov": "istanbul cover test/test.js",
"test-travis": "istanbul cover --report lcovonly test/test.js"
"lint": "echo 'ignore lint'",
"test": "node --trace-deprecation test/test.js",
"ci": "istanbul cover --report lcovonly test/test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/thejoshwolfe/yauzl.git"
"url": "https://github.com/node-modules/yauzl.git"
},
"keywords": [
"unzip",
Expand All @@ -22,12 +22,12 @@
"author": "Josh Wolfe <thejoshwolfe@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/thejoshwolfe/yauzl/issues"
"url": "https://github.com/node-modules/yauzl/issues"
},
"homepage": "https://github.com/thejoshwolfe/yauzl",
"homepage": "https://github.com/node-modules/yauzl",
"dependencies": {
"fd-slicer": "~1.1.0",
"buffer-crc32": "~0.2.3"
"buffer-crc32": "~0.2.3",
"fd-slicer2": "^1.2.0"
},
"devDependencies": {
"bl": "~1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/range-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function runTest(cb) {
}

function hexToBuffer(hexString) {
var buffer = new Buffer(hexString.length / 2);
var buffer = Buffer.alloc(hexString.length / 2);
for (var i = 0; i < buffer.length; i++) {
buffer[i] = parseInt(hexString.substr(i * 2, 2), 16);
}
Expand Down