vite-plugin-lib 2.1.4 → 2.1.6

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/dist/index.mjs +6 -6
  2. package/package.json +4 -3
package/dist/index.mjs CHANGED
@@ -60,7 +60,7 @@ function transformStaticImport(file, line, quote, verbose) {
60
60
  const importPathMarker = `from ${quote}`;
61
61
  const isStaticImport = line.includes("import ") && line.includes(`${importPathMarker}.`);
62
62
  if (!isStaticImport) {
63
- return undefined;
63
+ return void 0;
64
64
  }
65
65
  const importStartIndex = line.lastIndexOf(importPathMarker);
66
66
  const importPath = line.substring(
@@ -80,7 +80,7 @@ function transformExport(file, line, quote, verbose) {
80
80
  const exportPathMarker = ` from ${quote}`;
81
81
  const isStaticExport = line.includes("export ") && line.includes(`${exportPathMarker}.`);
82
82
  if (!isStaticExport) {
83
- return undefined;
83
+ return void 0;
84
84
  }
85
85
  const exportStartIndex = line.lastIndexOf(exportPathMarker);
86
86
  const exportPath = line.substring(
@@ -129,7 +129,7 @@ function tsconfigPaths(options = {}) {
129
129
  return config;
130
130
  }
131
131
  const pathToAlias = pathToAliasFactory(tsconfigPath, baseUrl, verbose);
132
- const aliasOptions = Object.entries(paths).map(pathToAlias).filter((alias) => alias !== undefined);
132
+ const aliasOptions = Object.entries(paths).map(pathToAlias).filter((alias) => alias !== void 0);
133
133
  if (aliasOptions.length > 0) {
134
134
  logInjectedAliases(aliasOptions, config, verbose);
135
135
  }
@@ -211,7 +211,7 @@ function pathToAliasFactory(tsconfigPath, baseUrl, verbose) {
211
211
  if (verbose) {
212
212
  logWarn(`No replacements for alias ${c.green(alias)}.`);
213
213
  }
214
- return undefined;
214
+ return void 0;
215
215
  }
216
216
  if (verbose && replacements.length > 1) {
217
217
  logWarn(`Found more than one replacement for alias ${c.green(alias)}.`);
@@ -228,7 +228,7 @@ function pathToAliasFactory(tsconfigPath, baseUrl, verbose) {
228
228
  if (verbose) {
229
229
  logWarn(`No replacement found for alias ${c.green(alias)}.`);
230
230
  }
231
- return undefined;
231
+ return void 0;
232
232
  }
233
233
  return {
234
234
  find,
@@ -247,7 +247,7 @@ function getFirstExistingReplacement(tsconfigPath, baseUrl, replacements, find,
247
247
  return resolvedReplacement;
248
248
  }
249
249
  }
250
- return undefined;
250
+ return void 0;
251
251
  }
252
252
  function formatToFileName(entry, format) {
253
253
  const entryFileName = entry.substring(
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "vite-plugin-lib",
3
- "version": "2.1.4",
3
+ "type": "module",
4
+ "version": "2.1.6",
4
5
  "description": "Vite plugin for build configuration, automatic aliases, and type declarations.",
5
6
  "author": "Jan Müller <janmueller3698@gmail.com>",
6
7
  "license": "MIT",
@@ -42,10 +43,10 @@
42
43
  "vite-plugin-dts": "4.5.0"
43
44
  },
44
45
  "devDependencies": {
45
- "@types/node": "22.10.7",
46
+ "@types/node": "22.13.1",
46
47
  "typescript": "5.7.3",
47
48
  "unbuild": "3.3.1",
48
- "vite": "6.0.7",
49
+ "vite": "6.1.0",
49
50
  "@yeger/tsconfig": "2.0.9"
50
51
  },
51
52
  "publishConfig": {