mirror of
https://github.com/lovell/sharp.git
synced 2025-08-24 21:41:40 +02:00
Compare commits
No commits in common. "main" and "v0.34.4-rc.0" have entirely different histories.
main
...
v0.34.4-rc
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -313,13 +313,12 @@ jobs:
|
||||
path: npm
|
||||
- name: Create npm workspace tarball
|
||||
run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Parse semver for tag
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: madhead/semver-utils@v4
|
||||
id: semver
|
||||
with:
|
||||
node-version: "24"
|
||||
- name: Create release notes
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: npm run package-release-notes
|
||||
version: ${{ github.ref_name }}
|
||||
- name: Create GitHub release for tag
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: ncipollo/release-action@v1
|
||||
@ -328,4 +327,4 @@ jobs:
|
||||
artifactContentType: application/x-xz
|
||||
prerelease: ${{ contains(github.ref, '-rc') }}
|
||||
makeLatest: ${{ !contains(github.ref, '-rc') }}
|
||||
bodyFile: release-notes.md
|
||||
bodyFile: "docs/src/content/docs/changelog/v${{ steps.semver.outputs.major }}.${{ steps.semver.outputs.minor }}.${{ steps.semver.outputs.patch }}.md"
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,4 +16,3 @@ package-lock.json
|
||||
.firebase
|
||||
.astro
|
||||
docs/dist
|
||||
release-notes.md
|
||||
|
@ -61,8 +61,6 @@ const rgba = await sharp(rgb)
|
||||
|
||||
Extract a single channel from a multi-channel image.
|
||||
|
||||
The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
|
||||
|
||||
|
||||
**Throws**:
|
||||
|
||||
|
@ -8,7 +8,3 @@ slug: changelog/v0.34.4
|
||||
|
||||
* Ensure `autoOrient` removes existing metadata after shrink-on-load.
|
||||
[#4431](https://github.com/lovell/sharp/issues/4431)
|
||||
|
||||
* TypeScript: Ensure `KernelEnum` includes `linear`.
|
||||
[#4441](https://github.com/lovell/sharp/pull/4441)
|
||||
[@BayanBennett](https://github.com/BayanBennett)
|
||||
|
@ -74,8 +74,6 @@ function ensureAlpha (alpha) {
|
||||
/**
|
||||
* Extract a single channel from a multi-channel image.
|
||||
*
|
||||
* The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
|
||||
*
|
||||
* @example
|
||||
* // green.jpg is a greyscale image containing the green channel of the input
|
||||
* await sharp(input)
|
||||
|
1
lib/index.d.ts
vendored
1
lib/index.d.ts
vendored
@ -1784,7 +1784,6 @@ declare namespace sharp {
|
||||
interface KernelEnum {
|
||||
nearest: 'nearest';
|
||||
cubic: 'cubic';
|
||||
linear: 'linear';
|
||||
mitchell: 'mitchell';
|
||||
lanczos2: 'lanczos2';
|
||||
lanczos3: 'lanczos3';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-darwin-arm64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with macOS 64-bit ARM",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-darwin-x64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with macOS x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-arm",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Linux (glibc) ARM (32-bit)",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-arm64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Linux (glibc) 64-bit ARM",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-ppc64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Linux (glibc) ppc64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-s390x",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Linux (glibc) s390x",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-x64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Linux (glibc) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linuxmusl-arm64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Linux (musl) 64-bit ARM",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linuxmusl-x64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Linux (musl) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"private": "true",
|
||||
"workspaces": [
|
||||
"darwin-arm64",
|
||||
|
@ -1,9 +0,0 @@
|
||||
const { readFileSync, writeFileSync } = require('node:fs');
|
||||
|
||||
const { version } = require('./package.json');
|
||||
const versionWithoutPreRelease = version.replace(/-rc\.\d+$/, '');
|
||||
|
||||
const markdown = readFileSync(`./docs/src/content/docs/changelog/v${versionWithoutPreRelease}.md`, 'utf8');
|
||||
const markdownWithoutFrontmatter = markdown.replace(/---\n.*?\n---\n+/s, '');
|
||||
|
||||
writeFileSync('./release-notes.md', markdownWithoutFrontmatter);
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-wasm32",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with wasm32",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-win32-arm64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Windows 64-bit ARM",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-win32-ia32",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Windows x86 (32-bit)",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-win32-x64",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"description": "Prebuilt sharp for use with Windows x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
33
package.json
33
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "sharp",
|
||||
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
|
||||
"version": "0.34.4-rc.1",
|
||||
"version": "0.34.4-rc.0",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"contributors": [
|
||||
@ -101,7 +101,6 @@
|
||||
"test-leak": "./test/leak/leak.sh",
|
||||
"test-types": "tsd",
|
||||
"package-from-local-build": "node npm/from-local-build.js",
|
||||
"package-release-notes": "node npm/release-notes.js",
|
||||
"docs-build": "node docs/build.mjs",
|
||||
"docs-serve": "cd docs && npm start",
|
||||
"docs-publish": "cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"
|
||||
@ -142,8 +141,8 @@
|
||||
"semver": "^7.7.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-darwin-arm64": "0.34.4-rc.1",
|
||||
"@img/sharp-darwin-x64": "0.34.4-rc.1",
|
||||
"@img/sharp-darwin-arm64": "0.34.4-rc.0",
|
||||
"@img/sharp-darwin-x64": "0.34.4-rc.0",
|
||||
"@img/sharp-libvips-darwin-arm64": "1.2.1",
|
||||
"@img/sharp-libvips-darwin-x64": "1.2.1",
|
||||
"@img/sharp-libvips-linux-arm": "1.2.1",
|
||||
@ -153,17 +152,17 @@
|
||||
"@img/sharp-libvips-linux-x64": "1.2.1",
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.2.1",
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.1",
|
||||
"@img/sharp-linux-arm": "0.34.4-rc.1",
|
||||
"@img/sharp-linux-arm64": "0.34.4-rc.1",
|
||||
"@img/sharp-linux-ppc64": "0.34.4-rc.1",
|
||||
"@img/sharp-linux-s390x": "0.34.4-rc.1",
|
||||
"@img/sharp-linux-x64": "0.34.4-rc.1",
|
||||
"@img/sharp-linuxmusl-arm64": "0.34.4-rc.1",
|
||||
"@img/sharp-linuxmusl-x64": "0.34.4-rc.1",
|
||||
"@img/sharp-wasm32": "0.34.4-rc.1",
|
||||
"@img/sharp-win32-arm64": "0.34.4-rc.1",
|
||||
"@img/sharp-win32-ia32": "0.34.4-rc.1",
|
||||
"@img/sharp-win32-x64": "0.34.4-rc.1"
|
||||
"@img/sharp-linux-arm": "0.34.4-rc.0",
|
||||
"@img/sharp-linux-arm64": "0.34.4-rc.0",
|
||||
"@img/sharp-linux-ppc64": "0.34.4-rc.0",
|
||||
"@img/sharp-linux-s390x": "0.34.4-rc.0",
|
||||
"@img/sharp-linux-x64": "0.34.4-rc.0",
|
||||
"@img/sharp-linuxmusl-arm64": "0.34.4-rc.0",
|
||||
"@img/sharp-linuxmusl-x64": "0.34.4-rc.0",
|
||||
"@img/sharp-wasm32": "0.34.4-rc.0",
|
||||
"@img/sharp-win32-arm64": "0.34.4-rc.0",
|
||||
"@img/sharp-win32-ia32": "0.34.4-rc.0",
|
||||
"@img/sharp-win32-x64": "0.34.4-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@emnapi/runtime": "^1.4.5",
|
||||
@ -182,11 +181,11 @@
|
||||
"license-checker": "^25.0.1",
|
||||
"mocha": "^11.7.1",
|
||||
"node-addon-api": "^8.5.0",
|
||||
"node-gyp": "^11.4.1",
|
||||
"node-gyp": "^11.2.0",
|
||||
"nyc": "^17.1.0",
|
||||
"semistandard": "^17.0.0",
|
||||
"tar-fs": "^3.1.0",
|
||||
"tsd": "^0.33.0"
|
||||
"tsd": "^0.32.0"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
|
@ -82,6 +82,7 @@ describe('Image channel extraction', function () {
|
||||
const output = fixtures.path('output.extract-alpha-2-channel.png');
|
||||
sharp(fixtures.inputPngWithGreyAlpha)
|
||||
.extractChannel('alpha')
|
||||
.toColourspace('b-w')
|
||||
.toFile(output, function (err, info) {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(1, info.channels);
|
||||
|
Loading…
x
Reference in New Issue
Block a user