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

esm: node v18+ required #233

Merged
merged 1 commit into from
Oct 15, 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
34 changes: 17 additions & 17 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
run: |
npm ci
npm test
env:
CI: true
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: tmp-zip-node-v${{ matrix.node-version }}
path: tmp/*.zip
- uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
run: |
npm ci
npm test
env:
CI: true
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: tmp-zip-node-v${{ matrix.node-version }}
path: tmp/*.zip
4 changes: 2 additions & 2 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 16
node-version: 20
- run: npm ci
- run: npm test

Expand All @@ -22,7 +22,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Changelog

**7.0.0** - <small>October 14, 2024</small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/6.0.1...7.0.0)

**6.0.1** - <small>March 9, 2024</small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/6.0.0...6.0.1)

**6.0.0** - <small>February 27, 2024</small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/5.0.2...6.0.0)
Expand Down
11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

#### Code Style Guide

* code should be indented with 2 spaces
* single quotes should be used where feasible
* commas should be followed by a single space (function params, etc)
* variable declaration should include `var`, [no multiple declarations](http://benalman.com/news/2012/05/multiple-var-statements-javascript/)
- code should be ran through `prettier`

#### Tests

* tests should be added to the nodeunit configs in `test/`
* tests can be run with `npm test`
* see existing tests for guidance
- tests should be added in `test/`
- tests can be run with `npm test`
- see existing tests for guidance
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ This module is meant to be wrapped internally by other modules and therefore lac
If you want a module that handles entry queueing and much more, you should check out [archiver](https://npmjs.org/package/archiver) which uses this module internally.

```js
const Packer = require('zip-stream');
const archive = new Packer(); // OR new Packer(options)
import { ZipStream } from "zip-stream":
const archive = new ZipStream(); // OR new ZipStream(options)

archive.on('error', function(err) {
archive.on("error", function (err) {
throw err;
});

// pipe archive where you want it (ie fs, http, etc)
// listen to the destination's end, close, or finish event

archive.entry('string contents', { name: 'string.txt' }, function(err, entry) {
archive.entry("string contents", { name: "string.txt" }, function (err, entry) {
if (err) throw err;
archive.entry(null, { name: 'directory/' }, function(err, entry) {
archive.entry(null, { name: "directory/" }, function (err, entry) {
if (err) throw err;
archive.finish();
});
Expand Down
Loading