Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
vctqs1 committed Dec 28, 2023
2 parents c75dfd1 + 8abca4b commit 3c6e01b
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
runs-on: ubuntu-latest
if:
${{ github.repository == 'OpenSourceRaidGuild/babel-vite' &&
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha',
github.ref) && github.event_name == 'push' }}
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha', github.ref) &&
github.event_name == 'push' }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
package-lock=false
legacy-peer-deps=true
workspaces-update=false
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"format": "kcd-scripts format"
},
"devDependencies": {
"kcd-scripts": "^13.0.0",
"kcd-scripts": "^14.0.1",
"multi-semantic-release": "^3.0.1",
"npm-run-all": "^4.1.5",
"typescript": "^5.0.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-vite-meta-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@babel/core": "^7.13.8",
"@types/babel-plugin-tester": "^9.0.1",
"babel-plugin-tester": "^10.0.0",
"kcd-scripts": "^13.0.0",
"kcd-scripts": "^14.0.1",
"typescript": "^5.0.3"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-transform-vite-meta-glob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
"@types/babel-plugin-tester": "^9.0.1",
"@types/glob": "^8.0.1",
"babel-plugin-tester": "^10.0.0",
"kcd-scripts": "^13.0.0",
"kcd-scripts": "^14.0.1",
"typescript": "^5.0.3"
},
"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
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-vite-meta-hot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@babel/core": "^7.13.8",
"@types/babel-plugin-tester": "^9.0.1",
"babel-plugin-tester": "^10.0.0",
"kcd-scripts": "^13.0.0",
"kcd-scripts": "^14.0.1",
"typescript": "^5.0.3"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@babel/core": "^7.13.8",
"@types/babel-plugin-tester": "^9.0.1",
"babel-plugin-tester": "^10.0.0",
"kcd-scripts": "^13.0.0",
"kcd-scripts": "^14.0.1",
"typescript": "^5.0.3"
},
"dependencies": {
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 3c6e01b

Please sign in to comment.