Skip to content

Commit

Permalink
Merge pull request #44 from Sparticuz/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparticuz authored Oct 4, 2024
2 parents 20c4187 + 8b62180 commit a9f1795
Show file tree
Hide file tree
Showing 23 changed files with 5,348 additions and 6,260 deletions.
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

0 comments on commit a9f1795

Please sign in to comment.