@vituum/vite-plugin-latte 2.0.0-next.1 → 2.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -6
  2. package/package.json +11 -10
package/index.js CHANGED
@@ -3,13 +3,12 @@ import { fileURLToPath } from 'node:url'
3
3
  import fs from 'node:fs'
4
4
  import process from 'node:process'
5
5
  import * as childProcess from 'node:child_process'
6
- import FastGlob from 'fast-glob'
7
- import { minimatch } from 'minimatch'
6
+ import picomatch from 'picomatch'
8
7
  import {
9
8
  getPackageInfo,
10
9
  pluginError,
11
10
  pluginReload,
12
- merge,
11
+ deepMergeWith,
13
12
  pluginBundle,
14
13
  normalizePath,
15
14
  pluginMiddleware,
@@ -57,7 +56,7 @@ const renderTemplate = ({ server, path, filename, cwd, packageRoot, viteServer }
57
56
  if (options.data) {
58
57
  const normalizePaths = Array.isArray(options.data) ? options.data.map(path => normalizePath(path)) : normalizePath(options.data)
59
58
 
60
- options.data = FastGlob.sync(normalizePaths).map(entry => resolve(cwd, entry))
59
+ options.data = fs.globSync(normalizePaths).map(entry => resolve(cwd, entry))
61
60
  }
62
61
 
63
62
  Object.keys(options.filters).forEach((key) => {
@@ -97,7 +96,7 @@ const plugin = (options = {}) => {
97
96
  let resolvedConfig
98
97
  let userEnv
99
98
 
100
- options = merge(defaultOptions, options)
99
+ options = deepMergeWith(defaultOptions, options)
101
100
 
102
101
  const cwd = process.cwd()
103
102
  const packageRoot = dirname((fileURLToPath(import.meta.url)))
@@ -143,7 +142,7 @@ const plugin = (options = {}) => {
143
142
  transformIndexHtml: {
144
143
  order: 'pre',
145
144
  async handler(content, { path, filename, server }) {
146
- if (options.ignoredPaths.find(ignoredPath => minimatch(path.replace('.html', ''), ignoredPath) === true)) {
145
+ if (options.ignoredPaths.find(ignoredPath => picomatch(ignoredPath)(path.replace('.html', '')) === true)) {
147
146
  return content
148
147
  }
149
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vituum/vite-plugin-latte",
3
- "version": "2.0.0-next.1",
3
+ "version": "2.0.0-next.3",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -14,19 +14,18 @@
14
14
  "publish-next": "npm publish --tag next"
15
15
  },
16
16
  "dependencies": {
17
- "vituum": "^2.0.0-next.1",
18
- "fast-glob": "^3.3",
19
- "lodash": "^4.17",
20
- "minimatch": "^10.1"
17
+ "picomatch": "^4.0.3",
18
+ "vituum": "^2.0.0-next.6"
21
19
  },
22
20
  "devDependencies": {
23
21
  "@eslint/js": "^9.39",
24
- "@stylistic/eslint-plugin": "^5.6",
22
+ "@stylistic/eslint-plugin": "^5.7",
25
23
  "@types/node": "^25",
26
- "vite": "^8.0.0-beta.3",
24
+ "@types/picomatch": "^4.0",
27
25
  "eslint": "^9.39",
28
- "globals": "^16.5",
29
- "typescript": "^5.9"
26
+ "globals": "^17.0",
27
+ "typescript": "^5.9",
28
+ "vite": "^8.0.0-beta.8"
30
29
  },
31
30
  "files": [
32
31
  "index.js",
@@ -39,7 +38,9 @@
39
38
  ],
40
39
  "exports": {
41
40
  ".": "./index.js",
42
- "./types": "./types/*"
41
+ "./types/*": {
42
+ "types": "./types/*"
43
+ }
43
44
  },
44
45
  "engines": {
45
46
  "node": "^18.0.0 || >=20.0.0"