mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Bump dev dependencies
This commit is contained in:
parent
46718102c6
commit
2678d7a660
@ -1,12 +1,13 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
const { extractDescription, extractKeywords } = require('./extract');
|
const { extractDescription, extractKeywords } = require('./extract');
|
||||||
|
|
||||||
const searchIndex = [];
|
const searchIndex = [];
|
||||||
|
|
||||||
// Install
|
// Install
|
||||||
const contents = fs.readFileSync(`${__dirname}/../install.md`, 'utf8');
|
const contents = fs.readFileSync(path.join(__dirname, '..', 'install.md'), 'utf8');
|
||||||
const matches = contents.matchAll(
|
const matches = contents.matchAll(
|
||||||
/## (?<title>[A-Za-z ]+)\n\n(?<body>[^#]+)/gs
|
/## (?<title>[A-Za-z ]+)\n\n(?<body>[^#]+)/gs
|
||||||
);
|
);
|
||||||
@ -34,7 +35,7 @@ for (const match of matches) {
|
|||||||
'colour',
|
'colour',
|
||||||
'utility'
|
'utility'
|
||||||
].forEach((section) => {
|
].forEach((section) => {
|
||||||
const contents = fs.readFileSync(`${__dirname}/../api-${section}.md`, 'utf8');
|
const contents = fs.readFileSync(path.join(__dirname, '..', `api-${section}.md`), 'utf8');
|
||||||
const matches = contents.matchAll(
|
const matches = contents.matchAll(
|
||||||
/\n## (?<title>[A-Za-z]+)\n\n(?<firstparagraph>.+?)\n\n/gs
|
/\n## (?<title>[A-Za-z]+)\n\n(?<firstparagraph>.+?)\n\n/gs
|
||||||
);
|
);
|
||||||
@ -54,6 +55,6 @@ for (const match of matches) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
`${__dirname}/../search-index.json`,
|
path.join(__dirname, '..', 'search-index.json'),
|
||||||
JSON.stringify(searchIndex)
|
JSON.stringify(searchIndex)
|
||||||
);
|
);
|
||||||
|
@ -121,23 +121,23 @@
|
|||||||
"prebuild-install": "^6.0.0",
|
"prebuild-install": "^6.0.0",
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.2",
|
||||||
"simple-get": "^4.0.0",
|
"simple-get": "^4.0.0",
|
||||||
"tar-fs": "^2.1.0",
|
"tar-fs": "^2.1.1",
|
||||||
"tunnel-agent": "^0.6.0"
|
"tunnel-agent": "^0.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"async": "^3.2.0",
|
"async": "^3.2.0",
|
||||||
"cc": "^2.0.1",
|
"cc": "^2.0.1",
|
||||||
"decompress-zip": "^0.3.2",
|
"decompress-zip": "^0.3.2",
|
||||||
"documentation": "^13.0.2",
|
"documentation": "^13.1.0",
|
||||||
"exif-reader": "^1.0.3",
|
"exif-reader": "^1.0.3",
|
||||||
"icc": "^2.0.0",
|
"icc": "^2.0.0",
|
||||||
"license-checker": "^25.0.1",
|
"license-checker": "^25.0.1",
|
||||||
"mocha": "^8.1.1",
|
"mocha": "^8.2.1",
|
||||||
"mock-fs": "^4.13.0",
|
"mock-fs": "^4.13.0",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"prebuild": "^10.0.1",
|
"prebuild": "^10.0.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"semistandard": "^14.2.3"
|
"semistandard": "^16.0.0"
|
||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"config": {
|
"config": {
|
||||||
|
@ -7,7 +7,7 @@ const sharp = require('../../');
|
|||||||
const fixtures = require('../fixtures');
|
const fixtures = require('../fixtures');
|
||||||
|
|
||||||
// Test Helpers
|
// Test Helpers
|
||||||
var threshold = 0.001;
|
const threshold = 0.001;
|
||||||
function isInAcceptableRange (actual, expected) {
|
function isInAcceptableRange (actual, expected) {
|
||||||
return actual >= ((1 - threshold) * expected) && actual <= ((1 + threshold) * expected);
|
return actual >= ((1 - threshold) * expected) && actual <= ((1 + threshold) * expected);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user