Skip to content

Commit 7b8211c

Browse files
committed
Update globby to v14
Also: * fix globals type * switch to async
1 parent 2bc395b commit 7b8211c

File tree

3 files changed

+130
-90
lines changed

3 files changed

+130
-90
lines changed

build/build-plugins.mjs

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
import path from 'node:path'
1010
import { fileURLToPath } from 'node:url'
1111
import { babel } from '@rollup/plugin-babel'
12-
import globby from 'globby'
12+
import { globby } from 'globby'
1313
import { rollup } from 'rollup'
1414
import banner from './banner.mjs'
1515

1616
const __filename = fileURLToPath(import.meta.url)
1717
const __dirname = path.dirname(fileURLToPath(import.meta.url))
1818

1919
const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/')
20-
const jsFiles = globby.sync(`${sourcePath}/**/*.js`)
20+
const jsFiles = await globby(`${sourcePath}/**/*.js`)
2121

2222
// Array which holds the resolved plugins
2323
const resolvedPlugins = []
@@ -37,6 +37,9 @@ for (const file of jsFiles) {
3737
}
3838

3939
const build = async plugin => {
40+
/**
41+
* @type {import('rollup').GlobalsOption}
42+
*/
4043
const globals = {}
4144

4245
const bundle = await rollup({

package-lock.json

+123-86
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"docs-serve": "hugo server --port 9001 --disableFastRender --noHTTPCache --renderToMemory --printPathWarnings --printUnusedTemplates",
8383
"docs-serve-only": "npx sirv-cli _site --port 9001",
8484
"lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
85-
"update-deps": "ncu -u -x globby,jasmine,karma-browserstack-launcher,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor",
85+
"update-deps": "ncu -u -x jasmine,karma-browserstack-launcher,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor",
8686
"release": "npm-run-all dist release-sri docs-build release-zip*",
8787
"release-sri": "node build/generate-sri.mjs",
8888
"release-version": "node build/change-version.mjs",
@@ -122,7 +122,7 @@
122122
"eslint-plugin-markdown": "^4.0.1",
123123
"eslint-plugin-unicorn": "^51.0.1",
124124
"find-unused-sass-variables": "^5.0.0",
125-
"globby": "^11.1.0",
125+
"globby": "^14.0.1",
126126
"hammer-simulator": "0.0.1",
127127
"hugo-bin": "^0.120.8",
128128
"ip": "^2.0.1",

0 commit comments

Comments
 (0)