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

Updates #44

Merged
merged 7 commits into from
Oct 4, 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
16 changes: 0 additions & 16 deletions .eslintrc.cjs

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:

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

steps:
- name: Install QPDF
run: |
sudo apt-get install wget unzip -y
wget -O /tmp/qpdf.zip https://github.com/qpdf/qpdf/releases/download/v11.6.3/qpdf-11.6.3-bin-linux-x86_64.zip
wget -O /tmp/qpdf.zip https://github.com/qpdf/qpdf/releases/download/v11.9.1/qpdf-11.9.1-bin-linux-x86_64.zip
sudo unzip -d / /tmp/qpdf.zip
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- uses: actions/setup-node@v4
- run: npm ci
- run: npm run build
- run: npm publish
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020-2023 Kyle McNally
Copyright (c) 2020-2024 Kyle McNally

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ await encrypt(pdf);

### Options for Encryption

Please see [src/encrypt.ts](https://github.com/Sparticuz/node-qpdf2/blob/master/src/encrypt.ts#L9) for the latest options, as well as [QPDF's documentation](https://qpdf.readthedocs.io/en/stable/cli.html#encryption) for information on what each restriction does.
Please see [src/encrypt.ts](https://github.com/Sparticuz/node-qpdf2/blob/master/src/encrypt.ts) for the latest options, as well as [QPDF's documentation](https://qpdf.readthedocs.io/en/stable/cli.html#encryption) for information on what each restriction does.

### Examples

Expand Down Expand Up @@ -103,15 +103,17 @@ If the file is not encrypted, the result will be "File is not encrypted".

## Coverage

| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
| ---------- | ------- | -------- | ------- | ------- | ----------------- |
| All files | 100 | 100 | 100 | 100 |
| decrypt.ts | 100 | 100 | 100 | 100 |
| encrypt.ts | 100 | 100 | 100 | 100 |
| index.ts | 100 | 100 | 100 | 100 |
| info.ts | 100 | 100 | 100 | 100 |
| spawn.ts | 100 | 100 | 100 | 100 |
| utils.ts | 100 | 100 | 100 | 100 |
------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
decrypt.ts | 100 | 100 | 100 | 100 |
encrypt.ts | 100 | 100 | 100 | 100 |
index.ts | 100 | 100 | 100 | 100 |
info.ts | 100 | 100 | 100 | 100 |
spawn.ts | 100 | 100 | 100 | 100 |
utils.ts | 100 | 100 | 100 | 100 |
------------|---------|----------|---------|---------|-------------------

## Contributing

Expand Down
21 changes: 21 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// @ts-check

import myConfig from "@sparticuz/eslint-config";
import tseslint from "typescript-eslint";

export default tseslint.config(
{
ignores: ["dist", "coverage"],
},
...myConfig,
{
rules: {
"perfectionist/sort-union-types": [
"error",
{
type: "natural",
},
],
},
},
);
Loading