@nx/vite 18.1.0 → 18.1.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/vite",
3
- "version": "18.1.0",
3
+ "version": "18.1.2",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for building and testing applications using Vite",
6
6
  "repository": {
@@ -29,13 +29,13 @@
29
29
  "migrations": "./migrations.json"
30
30
  },
31
31
  "dependencies": {
32
- "@nx/devkit": "18.1.0",
32
+ "@nx/devkit": "18.1.2",
33
33
  "@phenomnomnominal/tsquery": "~5.0.1",
34
34
  "@swc/helpers": "~0.5.0",
35
35
  "enquirer": "~2.3.6",
36
- "@nx/js": "18.1.0",
36
+ "@nx/js": "18.1.2",
37
37
  "tsconfig-paths": "^4.1.2",
38
- "@nrwl/vite": "18.1.0"
38
+ "@nrwl/vite": "18.1.2"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "vite": "^5.0.0",
@@ -31,22 +31,18 @@ function viteConfigurationGenerator(host, schema) {
31
31
  }
32
32
  async function viteConfigurationGeneratorInternal(tree, schema) {
33
33
  var _nxJson_plugins;
34
- var _schema, _schema1, // Setting default to jsdom since it is the most common use case (React, Web).
34
+ var _schema, // Setting default to jsdom since it is the most common use case (React, Web).
35
35
  // The @nx/js:lib generator specifically sets this to node to be more generic.
36
- _schema2;
36
+ _schema1, _schema2;
37
37
  const tasks = [];
38
- const nxJson = (0, _devkit.readNxJson)(tree);
39
- const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' && nxJson.useInferencePlugins !== false;
40
- var _addPlugin;
41
- (_addPlugin = (_schema = schema).addPlugin) != null ? _addPlugin : _schema.addPlugin = addPluginDefault;
42
38
  const projectConfig = (0, _devkit.readProjectConfiguration)(tree, schema.project);
43
39
  const { targets, root: projectRoot } = projectConfig;
44
40
  var _projectConfig_projectType;
45
41
  const projectType = (_projectConfig_projectType = projectConfig.projectType) != null ? _projectConfig_projectType : 'library';
46
42
  var _includeLib;
47
- (_includeLib = (_schema1 = schema).includeLib) != null ? _includeLib : _schema1.includeLib = projectType === 'library';
43
+ (_includeLib = (_schema = schema).includeLib) != null ? _includeLib : _schema.includeLib = projectType === 'library';
48
44
  var _testEnvironment;
49
- (_testEnvironment = (_schema2 = schema).testEnvironment) != null ? _testEnvironment : _schema2.testEnvironment = 'jsdom';
45
+ (_testEnvironment = (_schema1 = schema).testEnvironment) != null ? _testEnvironment : _schema1.testEnvironment = 'jsdom';
50
46
  /**
51
47
  * This is for when we are converting an existing project
52
48
  * to use the vite executors.
@@ -64,6 +60,10 @@ async function viteConfigurationGeneratorInternal(tree, schema) {
64
60
  }));
65
61
  tasks.push(initTask);
66
62
  tasks.push((0, _ensuredependencies.ensureDependencies)(tree, schema));
63
+ const nxJson = (0, _devkit.readNxJson)(tree);
64
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' && nxJson.useInferencePlugins !== false;
65
+ var _addPlugin;
66
+ (_addPlugin = (_schema2 = schema).addPlugin) != null ? _addPlugin : _schema2.addPlugin = addPluginDefault;
67
67
  const hasPlugin = (_nxJson_plugins = nxJson.plugins) == null ? void 0 : _nxJson_plugins.some((p)=>typeof p === 'string' ? p === '@nx/vite/plugin' : p.plugin === '@nx/vite/plugin');
68
68
  if (!hasPlugin) {
69
69
  if (!projectAlreadyHasViteTargets.build) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/vite/src/generators/configuration/configuration.ts"],"sourcesContent":["import {\n formatFiles,\n GeneratorCallback,\n joinPathFragments,\n readNxJson,\n readProjectConfiguration,\n runTasksInSerial,\n Tree,\n updateJson,\n} from '@nx/devkit';\nimport { initGenerator as jsInitGenerator } from '@nx/js';\n\nimport {\n addBuildTarget,\n addServeTarget,\n addPreviewTarget,\n createOrEditViteConfig,\n TargetFlags,\n} from '../../utils/generator-utils';\n\nimport initGenerator from '../init/init';\nimport vitestGenerator from '../vitest/vitest-generator';\nimport { ViteConfigurationGeneratorSchema } from './schema';\nimport { ensureDependencies } from '../../utils/ensure-dependencies';\nimport { convertNonVite } from './lib/convert-non-vite';\n\nexport function viteConfigurationGenerator(\n host: Tree,\n schema: ViteConfigurationGeneratorSchema\n) {\n return viteConfigurationGeneratorInternal(host, {\n addPlugin: false,\n ...schema,\n });\n}\n\nexport async function viteConfigurationGeneratorInternal(\n tree: Tree,\n schema: ViteConfigurationGeneratorSchema\n) {\n const tasks: GeneratorCallback[] = [];\n\n const nxJson = readNxJson(tree);\n const addPluginDefault =\n process.env.NX_ADD_PLUGINS !== 'false' &&\n nxJson.useInferencePlugins !== false;\n schema.addPlugin ??= addPluginDefault;\n\n const projectConfig = readProjectConfiguration(tree, schema.project);\n const { targets, root: projectRoot } = projectConfig;\n\n const projectType = projectConfig.projectType ?? 'library';\n\n schema.includeLib ??= projectType === 'library';\n\n // Setting default to jsdom since it is the most common use case (React, Web).\n // The @nx/js:lib generator specifically sets this to node to be more generic.\n schema.testEnvironment ??= 'jsdom';\n\n /**\n * This is for when we are converting an existing project\n * to use the vite executors.\n */\n let projectAlreadyHasViteTargets: TargetFlags = {};\n\n if (!schema.newProject) {\n await convertNonVite(tree, schema, projectRoot, projectType, targets);\n }\n\n const jsInitTask = await jsInitGenerator(tree, {\n ...schema,\n skipFormat: true,\n tsConfigName: projectRoot === '.' ? 'tsconfig.json' : 'tsconfig.base.json',\n });\n tasks.push(jsInitTask);\n const initTask = await initGenerator(tree, { ...schema, skipFormat: true });\n tasks.push(initTask);\n tasks.push(ensureDependencies(tree, schema));\n\n const hasPlugin = nxJson.plugins?.some((p) =>\n typeof p === 'string'\n ? p === '@nx/vite/plugin'\n : p.plugin === '@nx/vite/plugin'\n );\n\n if (!hasPlugin) {\n if (!projectAlreadyHasViteTargets.build) {\n addBuildTarget(tree, schema, 'build');\n }\n\n if (!schema.includeLib) {\n if (!projectAlreadyHasViteTargets.serve) {\n addServeTarget(tree, schema, 'serve');\n }\n if (!projectAlreadyHasViteTargets.preview) {\n addPreviewTarget(tree, schema, 'preview');\n }\n }\n }\n if (projectType === 'library') {\n // update tsconfig.lib.json to include vite/client\n updateJson(\n tree,\n joinPathFragments(projectRoot, 'tsconfig.lib.json'),\n (json) => {\n if (!json.compilerOptions) {\n json.compilerOptions = {};\n }\n if (!json.compilerOptions.types) {\n json.compilerOptions.types = [];\n }\n if (!json.compilerOptions.types.includes('vite/client')) {\n return {\n ...json,\n compilerOptions: {\n ...json.compilerOptions,\n types: [...json.compilerOptions.types, 'vite/client'],\n },\n };\n }\n return json;\n }\n );\n }\n\n if (!schema.newProject) {\n // We are converting existing project to use Vite\n if (schema.uiFramework === 'react') {\n createOrEditViteConfig(\n tree,\n {\n project: schema.project,\n includeLib: schema.includeLib,\n includeVitest: schema.includeVitest,\n inSourceTests: schema.inSourceTests,\n rollupOptionsExternal: [\n \"'react'\",\n \"'react-dom'\",\n \"'react/jsx-runtime'\",\n ],\n imports: [\n schema.compiler === 'swc'\n ? `import react from '@vitejs/plugin-react-swc'`\n : `import react from '@vitejs/plugin-react'`,\n ],\n plugins: ['react()'],\n },\n false,\n undefined\n );\n } else {\n createOrEditViteConfig(tree, schema, false, projectAlreadyHasViteTargets);\n }\n }\n\n if (schema.includeVitest) {\n const vitestTask = await vitestGenerator(tree, {\n project: schema.project,\n uiFramework: schema.uiFramework,\n inSourceTests: schema.inSourceTests,\n coverageProvider: 'v8',\n skipViteConfig: true,\n testTarget: 'test',\n skipFormat: true,\n addPlugin: schema.addPlugin,\n });\n tasks.push(vitestTask);\n }\n\n if (!schema.skipFormat) {\n await formatFiles(tree);\n }\n\n return runTasksInSerial(...tasks);\n}\n\nexport default viteConfigurationGenerator;\n"],"names":["viteConfigurationGenerator","viteConfigurationGeneratorInternal","host","schema","addPlugin","tree","nxJson","tasks","readNxJson","addPluginDefault","process","env","NX_ADD_PLUGINS","useInferencePlugins","projectConfig","readProjectConfiguration","project","targets","root","projectRoot","projectType","includeLib","testEnvironment","projectAlreadyHasViteTargets","newProject","convertNonVite","jsInitTask","jsInitGenerator","skipFormat","tsConfigName","push","initTask","initGenerator","ensureDependencies","hasPlugin","plugins","some","p","plugin","build","addBuildTarget","serve","addServeTarget","preview","addPreviewTarget","updateJson","joinPathFragments","json","compilerOptions","types","includes","uiFramework","createOrEditViteConfig","includeVitest","inSourceTests","rollupOptionsExternal","imports","compiler","undefined","vitestTask","vitestGenerator","coverageProvider","skipViteConfig","testTarget","formatFiles","runTasksInSerial"],"mappings":";;;;;;;;IA0BgBA,0BAA0B;eAA1BA;;IAUMC,kCAAkC;eAAlCA;;IA4ItB,OAA0C;eAA1C;;;;wBAvKO;oBAC0C;gCAQ1C;sBAEmB;iCACE;oCAEO;gCACJ;AAExB,SAASD,2BACdE,IAAU,EACVC,MAAwC;IAExC,OAAOF,mCAAmCC,MAAM;QAC9CE,WAAW;OACRD;AAEP;AAEO,eAAeF,mCACpBI,IAAU,EACVF,MAAwC;QAyCtBG;QAjClBH,SAOAA,UAEA,8EAA8E;IAC9E,8EAA8E;IAC9EA;IAjBA,MAAMI,QAA6B,EAAE;IAErC,MAAMD,SAASE,IAAAA,kBAAU,EAACH;IAC1B,MAAMI,mBACJC,QAAQC,GAAG,CAACC,cAAc,KAAK,WAC/BN,OAAOO,mBAAmB,KAAK;;IACjCV,eAAAA,UAAAA,QAAOC,kCAAPD,QAAOC,YAAcK;IAErB,MAAMK,gBAAgBC,IAAAA,gCAAwB,EAACV,MAAMF,OAAOa,OAAO;IACnE,MAAM,EAAEC,OAAO,EAAEC,MAAMC,WAAW,EAAE,GAAGL;QAEnBA;IAApB,MAAMM,cAAcN,CAAAA,6BAAAA,cAAcM,WAAW,YAAzBN,6BAA6B;;IAEjDX,gBAAAA,WAAAA,QAAOkB,oCAAPlB,SAAOkB,aAAeD,gBAAgB;;IAItCjB,qBAAAA,WAAAA,QAAOmB,8CAAPnB,SAAOmB,kBAAoB;IAE3B;;;GAGC,GACD,IAAIC,+BAA4C,CAAC;IAEjD,IA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eAAe,CAACC,KAAK,CAACC,QAAQ,CAAC,gBAAgB;gBACvD,OAAO,eACFH;oBACHC,iBAAiB,eACZD,KAAKC,eAAe;wBACvBC,OAAO;+BAAIF,KAAKC,eAAe,CAACC,KAAK;4BAAE;yBAAc;;;YAG3D;YACA,OAAOF;QACT;IAEJ;IAEA,IAAI,CAAC5C,OAAOqB,UAAU,EAAE;QACtB,iDAAiD;QACjD,IAAIrB,OAAOgD,WAAW,KAAK,SAAS;YAClCC,IAAAA,sCAAsB,EACpB/C,MACA;gBACEW,SAASb,OAAOa,OAAO;gBACvBK,YAAYlB,OAAOkB,UAAU;gBAC7BgC,eAAelD,OAAOkD,aAAa;gBACnCC,eAAenD,OAAOmD,aAAa;gBACnCC,uBAAuB;oBACrB;oBACA;oBACA;iBACD;gBACDC,SAAS;oBACPrD,OAAOsD,QAAQ,KAAK,QAChB,CAAC,4CAA4C,CAAC,GAC9C,CAAC,wCAAwC,CAAC;iBAC/C;gBACDtB,SAAS;oBAAC;iBAAU;YACtB,GACA,OACAuB;QAEJ,OAAO;YACLN,IAAAA,sCAAsB,EAAC/C,MAAMF,QAAQ,OAAOoB;QAC9C;IACF;IAEA,IAAIpB,OAAOkD,aAAa,EAAE;QACxB,MAAMM,aAAa,MAAMC,IAAAA,wBAAe,EAACvD,MAAM;YAC7CW,SAASb,OAAOa,OAAO;YACvBmC,aAAahD,OAAOgD,WAAW;YAC/BG,eAAenD,OAAOmD,aAAa;YACnCO,kBAAkB;YAClBC,gBAAgB;YAChBC,YAAY;YACZnC,YAAY;YACZxB,WAAWD,OAAOC,SAAS;QAC7B;QACAG,MAAMuB,IAAI,CAAC6B;IACb;IAEA,IAAI,CAACxD,OAAOyB,UAAU,EAAE;QACtB,MAAMoC,IAAAA,mBAAW,EAAC3D;IACpB;IAEA,OAAO4D,IAAAA,wBAAgB,KAAI1D;AAC7B;MAEA,WAAeP"}
1
+ {"version":3,"sources":["../../../../../../packages/vite/src/generators/configuration/configuration.ts"],"sourcesContent":["import {\n formatFiles,\n GeneratorCallback,\n joinPathFragments,\n readNxJson,\n readProjectConfiguration,\n runTasksInSerial,\n Tree,\n updateJson,\n} from '@nx/devkit';\nimport { initGenerator as jsInitGenerator } from '@nx/js';\n\nimport {\n addBuildTarget,\n addServeTarget,\n addPreviewTarget,\n createOrEditViteConfig,\n TargetFlags,\n} from '../../utils/generator-utils';\n\nimport initGenerator from '../init/init';\nimport vitestGenerator from '../vitest/vitest-generator';\nimport { ViteConfigurationGeneratorSchema } from './schema';\nimport { ensureDependencies } from '../../utils/ensure-dependencies';\nimport { convertNonVite } from './lib/convert-non-vite';\n\nexport function viteConfigurationGenerator(\n host: Tree,\n schema: ViteConfigurationGeneratorSchema\n) {\n return viteConfigurationGeneratorInternal(host, {\n addPlugin: false,\n ...schema,\n });\n}\n\nexport async function viteConfigurationGeneratorInternal(\n tree: Tree,\n schema: ViteConfigurationGeneratorSchema\n) {\n const tasks: GeneratorCallback[] = [];\n\n const projectConfig = readProjectConfiguration(tree, schema.project);\n const { targets, root: projectRoot } = projectConfig;\n\n const projectType = projectConfig.projectType ?? 'library';\n\n schema.includeLib ??= projectType === 'library';\n\n // Setting default to jsdom since it is the most common use case (React, Web).\n // The @nx/js:lib generator specifically sets this to node to be more generic.\n schema.testEnvironment ??= 'jsdom';\n\n /**\n * This is for when we are converting an existing project\n * to use the vite executors.\n */\n let projectAlreadyHasViteTargets: TargetFlags = {};\n\n if (!schema.newProject) {\n await convertNonVite(tree, schema, projectRoot, projectType, targets);\n }\n\n const jsInitTask = await jsInitGenerator(tree, {\n ...schema,\n skipFormat: true,\n tsConfigName: projectRoot === '.' ? 'tsconfig.json' : 'tsconfig.base.json',\n });\n tasks.push(jsInitTask);\n const initTask = await initGenerator(tree, { ...schema, skipFormat: true });\n tasks.push(initTask);\n tasks.push(ensureDependencies(tree, schema));\n\n const nxJson = readNxJson(tree);\n const addPluginDefault =\n process.env.NX_ADD_PLUGINS !== 'false' &&\n nxJson.useInferencePlugins !== false;\n schema.addPlugin ??= addPluginDefault;\n\n const hasPlugin = nxJson.plugins?.some((p) =>\n typeof p === 'string'\n ? p === '@nx/vite/plugin'\n : p.plugin === '@nx/vite/plugin'\n );\n\n if (!hasPlugin) {\n if (!projectAlreadyHasViteTargets.build) {\n addBuildTarget(tree, schema, 'build');\n }\n\n if (!schema.includeLib) {\n if (!projectAlreadyHasViteTargets.serve) {\n addServeTarget(tree, schema, 'serve');\n }\n if (!projectAlreadyHasViteTargets.preview) {\n addPreviewTarget(tree, schema, 'preview');\n }\n }\n }\n if (projectType === 'library') {\n // update tsconfig.lib.json to include vite/client\n updateJson(\n tree,\n joinPathFragments(projectRoot, 'tsconfig.lib.json'),\n (json) => {\n if (!json.compilerOptions) {\n json.compilerOptions = {};\n }\n if (!json.compilerOptions.types) {\n json.compilerOptions.types = [];\n }\n if (!json.compilerOptions.types.includes('vite/client')) {\n return {\n ...json,\n compilerOptions: {\n ...json.compilerOptions,\n types: [...json.compilerOptions.types, 'vite/client'],\n },\n };\n }\n return json;\n }\n );\n }\n\n if (!schema.newProject) {\n // We are converting existing project to use Vite\n if (schema.uiFramework === 'react') {\n createOrEditViteConfig(\n tree,\n {\n project: schema.project,\n includeLib: schema.includeLib,\n includeVitest: schema.includeVitest,\n inSourceTests: schema.inSourceTests,\n rollupOptionsExternal: [\n \"'react'\",\n \"'react-dom'\",\n \"'react/jsx-runtime'\",\n ],\n imports: [\n schema.compiler === 'swc'\n ? `import react from '@vitejs/plugin-react-swc'`\n : `import react from '@vitejs/plugin-react'`,\n ],\n plugins: ['react()'],\n },\n false,\n undefined\n );\n } else {\n createOrEditViteConfig(tree, schema, false, projectAlreadyHasViteTargets);\n }\n }\n\n if (schema.includeVitest) {\n const vitestTask = await vitestGenerator(tree, {\n project: schema.project,\n uiFramework: schema.uiFramework,\n inSourceTests: schema.inSourceTests,\n coverageProvider: 'v8',\n skipViteConfig: true,\n testTarget: 'test',\n skipFormat: true,\n addPlugin: schema.addPlugin,\n });\n tasks.push(vitestTask);\n }\n\n if (!schema.skipFormat) {\n await formatFiles(tree);\n }\n\n return runTasksInSerial(...tasks);\n}\n\nexport default viteConfigurationGenerator;\n"],"names":["viteConfigurationGenerator","viteConfigurationGeneratorInternal","host","schema","addPlugin","tree","nxJson","tasks","projectConfig","readProjectConfiguration","project","targets","root","projectRoot","projectType","includeLib","testEnvironment","projectAlreadyHasViteTargets","newProject","convertNonVite","jsInitTask","jsInitGenerator","skipFormat","tsConfigName","push","initTask","initGenerator","ensureDependencies","readNxJson","addPluginDefault","process","env","NX_ADD_PLUGINS","useInferencePlugins","hasPlugin","plugins","some","p","plugin","build","addBuildTarget","serve","addServeTarget","preview","addPreviewTarget","updateJson","joinPathFragments","json","compilerOptions","types","includes","uiFramework","createOrEditViteConfig","includeVitest","inSourceTests","rollupOptionsExternal","imports","compiler","undefined","vitestTask","vitestGenerator","coverageProvider","skipViteConfig","testTarget","formatFiles","runTasksInSerial"],"mappings":";;;;;;;;IA0BgBA,0BAA0B;eAA1BA;;IAUMC,kCAAkC;eAAlCA;;IA4ItB,OAA0C;eAA1C;;;;wBAvKO;oBAC0C;gCAQ1C;sBAEmB;iCACE;oCAEO;gCACJ;AAExB,SAASD,2BACdE,IAAU,EACVC,MAAwC;IAExC,OAAOF,mCAAmCC,MAAM;QAC9CE,WAAW;OACRD;AAEP;AAEO,eAAeF,mCACpBI,IAAU,EACVF,MAAwC;QAyCtBG;QAhClBH,SAEA,8EAA8E;IAC9E,8EAA8E;IAC9EA,UA0BAA;IArCA,MAAMI,QAA6B,EAAE;IAErC,MAAMC,gBAAgBC,IAAAA,gCAAwB,EAACJ,MAAMF,OAAOO,OAAO;IACnE,MAAM,EAAEC,OAAO,EAAEC,MAAMC,WAAW,EAAE,GAAGL;QAEnBA;IAApB,MAAMM,cAAcN,CAAAA,6BAAAA,cAAcM,WAAW,YAAzBN,6BAA6B;;IAEjDL,gBAAAA,UAAAA,QAAOY,oCAAPZ,QAAOY,aAAeD,gBAAgB;;IAItCX,qBAAAA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