From 12fd512b832f7f4a92ce3c24a5dbc13738e8bf1c Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 4 Nov 2023 21:15:18 +0000 Subject: [PATCH] CI: simplify npm package smoke tests by using import --- .github/workflows/npm.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 3f6f61097..2bdf53178 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -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