CI: simplify npm package smoke tests by using import

This commit is contained in:
Lovell Fuller 2023-11-04 21:15:18 +00:00
parent 239435a6dc
commit 12fd512b83

View File

@ -112,10 +112,8 @@ jobs:
with:
path: release.mjs
contents: |
import { createRequire } from 'node:module';
import { deepStrictEqual } from 'node:assert';
const require = createRequire(import.meta.url);
const sharp = require('sharp');
import sharp from 'sharp';
deepStrictEqual(['.jpg', '.jpeg', '.jpe'], sharp.format.jpeg.input.fileSuffix);
- name: Run with Node.js + npm