mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
CI: simplify npm package smoke tests by using import
This commit is contained in:
parent
239435a6dc
commit
12fd512b83
4
.github/workflows/npm.yml
vendored
4
.github/workflows/npm.yml
vendored
@ -112,10 +112,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: release.mjs
|
path: release.mjs
|
||||||
contents: |
|
contents: |
|
||||||
import { createRequire } from 'node:module';
|
|
||||||
import { deepStrictEqual } from 'node:assert';
|
import { deepStrictEqual } from 'node:assert';
|
||||||
const require = createRequire(import.meta.url);
|
import sharp from 'sharp';
|
||||||
const sharp = require('sharp');
|
|
||||||
deepStrictEqual(['.jpg', '.jpeg', '.jpe'], sharp.format.jpeg.input.fileSuffix);
|
deepStrictEqual(['.jpg', '.jpeg', '.jpe'], sharp.format.jpeg.input.fileSuffix);
|
||||||
|
|
||||||
- name: Run with Node.js + npm
|
- name: Run with Node.js + npm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user