Skip to content

Commit

Permalink
chore(deps): bump glob from 8.1.0 to 10.3.10 (#44)
Browse files Browse the repository at this point in the history
* chore(deps): bump glob from 8.1.0 to 10.3.10

Bumps [glob](https://github.com/isaacs/node-glob) from 8.1.0 to 10.3.10.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v8.1.0...v10.3.10)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* test: update tests for enforced dot prefix on relative files output

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyper <mpeyper7@gmail.com>
  • Loading branch information
dependabot[bot] and mpeyper committed Dec 18, 2023
1 parent f97d5e8 commit d4c8380
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
"dependencies": {
"@babel/runtime": "^7.13.9",
"@types/babel__core": "^7.1.12",
"glob": "^8.0.1"
"glob": "^10.3.10"
}
}
6 changes: 3 additions & 3 deletions packages/babel-plugin-transform-vite-meta-glob/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodePath from 'path'
import type babelCore from '@babel/core'
import glob from 'glob'
import { globSync } from 'glob'

export default function viteMetaGlobBabelPlugin({
types: t
Expand Down Expand Up @@ -42,7 +42,7 @@ export default function viteMetaGlobBabelPlugin({
t.isStringLiteral(args[0])
) {
const cwd = nodePath.dirname(sourceFile)
const globPaths = glob.sync(args[0].value, { cwd })
const globPaths = globSync(args[0].value, { cwd, dotRelative: true }).sort()

const replacement = t.objectExpression(
globPaths.map((globPath) =>
Expand Down Expand Up @@ -85,7 +85,7 @@ export default function viteMetaGlobBabelPlugin({
t.isBooleanLiteral(eagerOption[0].value)
) {
const cwd = nodePath.dirname(sourceFile)
const globPaths = glob.sync(args[0].value, { cwd })
const globPaths = globSync(args[0].value, { cwd, dotRelative: true }).sort()

if (eagerOption[0].value.value) {
const identifiers = globPaths.map((_, idx) => t.identifier(`__glob__0_${idx}`))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export const hot = import.meta.hot
export const envVar = process.env.VITE_VAR
export const modules = {
'files/file1.ts': () => import('files/file1.ts')
'./files/file1.ts': () => import('./files/file1.ts')
}
export const eagerModules = {
'files/file1.ts': require('files/file1.ts')
'./files/file1.ts': require('./files/file1.ts')
}
export const hot = module.hot
Expand All @@ -38,10 +38,10 @@ export const hot = import.meta.hot
export const envVar = process.env.VITE_VAR
export const modules = {
'files/file1.ts': () => import('files/file1.ts')
'./files/file1.ts': () => import('./files/file1.ts')
}
export const eagerModules = {
'files/file1.ts': require('files/file1.ts')
'./files/file1.ts': require('./files/file1.ts')
}
export const hot = module.hot
Expand Down Expand Up @@ -82,10 +82,10 @@ export const hot = import.meta.hot
export const envVar = import.meta.env.VITE_VAR
export const modules = {
'files/file1.ts': () => import('files/file1.ts')
'./files/file1.ts': () => import('./files/file1.ts')
}
export const eagerModules = {
'files/file1.ts': require('files/file1.ts')
'./files/file1.ts': require('./files/file1.ts')
}
export const hot = import.meta.hot
Expand Down

0 comments on commit d4c8380

Please sign in to comment.