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

General maintenance and npm package updates (please see mentioned details) #7

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parserOptions": {
"ecmaVersion": 2018
},
"extends": ["standard", "prettier", "prettier/standard"],
"extends": ["standard", "plugin:prettier/recommended"],
"plugins": ["mocha"],
"env": {
"mocha": true
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ jobs:
strategy:
matrix:
node:
- "14"
- "16"
- "18"
- "20"
steps:
- uses: actions/checkout@v2
- name: Setup node
Expand All @@ -39,7 +38,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '16'
node-version: '18'
- name: Install dependencies
run: sudo add-apt-repository -y ppa:inkscape.dev/stable && sudo apt-get install -y libcairo2-dev libjpeg8-dev libgif-dev optipng pngcrush pngquant libpango1.0-dev graphicsmagick libjpeg-turbo-progs inkscape gifsicle
- run: npm install
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.21.3
18.19.0
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"singleQuote": true
"singleQuote": true,
"trailingComma": "es5"
}
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,36 @@
},
"devDependencies": {
"animated-gif-detector": "1.2.0",
"eslint": "^7.16.0",
"eslint-config-prettier": "^6.15.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-mocha": "^7.0.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^5.0.0",
"evaldown": "^2.0.0",
"file-type": "^12.3.0",
"gifsicle": "^5.3.0",
"gm-papandreou": "1.23.0-patch1",
"impro": "file:./",
"inkscape": "3.0.0",
"inkscape": "3.1.1",
"jpegtran": "2.0.0",
"memoizesync": "^1.1.1",
"mocha": "^8.2.1",
"nyc": "^14.1.1",
"offline-github-changelog": "^1.7.0",
"optipng": "^4.0.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"offline-github-changelog": "^3.0.1",
"optipng": "^4.2.0",
"pngcrush": "^3.0.0",
"pngquant": "^4.0.0",
"prettier": "~2.2.1",
"sharp": "~0.32.0",
"sinon": "^9.2.4",
"pngquant": "^4.2.0",
"prettier": "~3.2.4",
"sharp": "~0.33.2",
"sinon": "^17.0.1",
"svgfilter": "4.1.0",
"unexpected": "^12.0.1",
"unexpected-dom": "^5.0.0",
"unexpected-sinon": "^11.0.1"
"unexpected": "^12.0.5",
"unexpected-dom": "^6.0.1",
"unexpected-sinon": "^11.1.0"
},
"dependencies": {
"exif-reader": "^1.0.3",
Expand Down
9 changes: 3 additions & 6 deletions src/Impro.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@ module.exports = class Impro {

this._Pipeline = class extends Pipeline {};

[
'type',
'source',
'maxInputPixels',
'maxOutputPixels',
].forEach((propertyName) => this.registerMethod(propertyName));
['type', 'source', 'maxInputPixels', 'maxOutputPixels'].forEach(
(propertyName) => this.registerMethod(propertyName)
);
}

createPipeline(options, operations) {
Expand Down
2 changes: 1 addition & 1 deletion src/queryString.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function parseImproQueryString(queryString, improInstance, allowOperation) {
}

return {
operations: operations,
operations,
leftover: leftOverQueryStringFragments.join('&'),
consumed: consumedQueryStringFragments.join('&'),
};
Expand Down
10 changes: 9 additions & 1 deletion test/impro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,15 @@ expect.addAssertion(
async (expect, subject, ...rest) => {
const encoding = expect.alternations ? expect.alternations[0] : undefined;
expect.errorMode = 'bubble';
return expect(await consumeStream(subject, encoding), ...rest);
const contents = await consumeStream(subject, encoding);

// // DEV-HELPER: Uncomment this block to write the output to a file when debugging a test
// fs.writeFileSync(
// pathModule.resolve(testDataPath, 'mismatching-file.extension'),
// contents
// );

return expect(contents, ...rest);
}
);

Expand Down
2 changes: 1 addition & 1 deletion testdata/addBogusElement.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* globals svgFilter:false */
var bogus = document.createElement('bogus');
const bogus = document.createElement('bogus');
bogus.setAttribute('id', svgFilter.bogusElementId || 'blablaf');
document.documentElement.appendChild(bogus);
Binary file modified testdata/turtleCroppedCenterSharp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading