From fca1c56f15f81fdc49a6c572ec2046c5e721db09 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 23 Jul 2024 10:59:06 -0400 Subject: [PATCH] Build: use --input-type=module in npm scripts Ref gh-5522 --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index adc2f2245..5aff08ef6 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,13 @@ "version": "3.7.1", "main": "dist/jquery.js", "scripts": { - "authors:check": "node -e \"(async () => { const { checkAuthors } = await import('./build/release/authors.js'); checkAuthors() })()\"", - "authors:update": "node -e \"(async () => { const { updateAuthors } = await import('./build/release/authors.js'); updateAuthors() })()\"", + "authors:check": "node --input-type=module -e \"import { checkAuthors } from './build/release/authors.js'; checkAuthors()\"", + "authors:update": "node --input-type=module -e \"import { updateAuthors } from './build/release/authors.js'; updateAuthors()\"", "babel:tests": "babel test/data/core/jquery-iterability-transpiled-es6.js --out-file test/data/core/jquery-iterability-transpiled.js", "build": "node ./build/command.js", - "build:all": "node -e \"(async () => { const { buildDefaultFiles } = await import('./build/tasks/build.js'); buildDefaultFiles() })()\"", + "build:all": "node --input-type=module -e \"import { buildDefaultFiles } from './build/tasks/build.js'; buildDefaultFiles()\"", "build:clean": "rimraf --glob dist/*.{js,map} --glob dist-module/*.{js,map}", - "build:main": "node -e \"(async () => { const { build } = await import('./build/tasks/build.js'); build() })()\"", + "build:main": "node --input-type=module -e \"import { build } from './build/tasks/build.js'; build()\"", "lint:dev": "eslint --cache .", "lint:json": "jsonlint --quiet package.json", "lint": "concurrently -r \"npm:lint:dev\" \"npm:lint:json\"", -- 2.39.5