@trackunit/iris-app 2.16.71 → 2.16.73
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 2.16.73 (2026-11-30)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for iris-app to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 2.16.72 (2026-11-30)
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated iris-app-build-utilities to 3.0.56
|
|
10
|
+
- Updated iris-app-api to 2.14.1
|
|
11
|
+
- Updated react-vite-test-setup to 0.0.244
|
|
12
|
+
- Updated css-classname-utils to 0.0.152
|
|
13
|
+
- Updated react-graphql-tools to 1.23.76
|
|
14
|
+
- Updated shared-utils to 1.22.71
|
|
15
|
+
|
|
1
16
|
## 2.16.71 (2026-11-30)
|
|
2
17
|
|
|
3
18
|
### 🧱 Updated Dependencies
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.73",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"generators": "./generators.json",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"node": ">=24.x"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@trackunit/css-classname-utils": "~0.0.
|
|
13
|
+
"@trackunit/css-classname-utils": "~0.0.152",
|
|
14
14
|
"@typescript-eslint/types": "8.71.2",
|
|
15
15
|
"@typescript-eslint/typescript-estree": "8.71.2",
|
|
16
16
|
"pacote": "^21.5.1",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@npmcli/arborist": "^9.1.9",
|
|
28
28
|
"win-ca": "^3.5.1",
|
|
29
29
|
"node-forge": "^1.4.3",
|
|
30
|
-
"@trackunit/iris-app-build-utilities": "^3.0.
|
|
31
|
-
"@trackunit/react-graphql-tools": "^1.23.
|
|
32
|
-
"@trackunit/shared-utils": "^1.22.
|
|
33
|
-
"@trackunit/iris-app-api": "^2.14.
|
|
30
|
+
"@trackunit/iris-app-build-utilities": "^3.0.56",
|
|
31
|
+
"@trackunit/react-graphql-tools": "^1.23.76",
|
|
32
|
+
"@trackunit/shared-utils": "^1.22.71",
|
|
33
|
+
"@trackunit/iris-app-api": "^2.14.1",
|
|
34
34
|
"tslib": "^2.6.2",
|
|
35
35
|
"@clack/prompts": "^1.8.1",
|
|
36
36
|
"@nx/devkit": "23.3.0",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
},
|
|
39
39
|
"migrations": "./migrations.json",
|
|
40
40
|
"pinnedVersions": {
|
|
41
|
-
"@trackunit/iris-app-api": "2.14.
|
|
42
|
-
"@trackunit/react-components": "9.0.
|
|
43
|
-
"@trackunit/react-core-contexts": "3.1.
|
|
44
|
-
"@trackunit/css-core": "1.22.
|
|
45
|
-
"@trackunit/iris-app-sdk-vite": "1.12.
|
|
46
|
-
"@trackunit/react-core-contexts-test": "1.28.
|
|
47
|
-
"@trackunit/react-vite-test-setup": "0.0.
|
|
48
|
-
"@trackunit/iris-app-runtime-core": "2.0.
|
|
49
|
-
"@trackunit/serverside-utils": "0.5.
|
|
50
|
-
"@trackunit/migrations": "0.2.
|
|
51
|
-
"@trackunit/eslint-plugin-trackunit": "0.9.
|
|
41
|
+
"@trackunit/iris-app-api": "2.14.1",
|
|
42
|
+
"@trackunit/react-components": "9.0.6",
|
|
43
|
+
"@trackunit/react-core-contexts": "3.1.7",
|
|
44
|
+
"@trackunit/css-core": "1.22.76",
|
|
45
|
+
"@trackunit/iris-app-sdk-vite": "1.12.37",
|
|
46
|
+
"@trackunit/react-core-contexts-test": "1.28.68",
|
|
47
|
+
"@trackunit/react-vite-test-setup": "0.0.244",
|
|
48
|
+
"@trackunit/iris-app-runtime-core": "2.0.12",
|
|
49
|
+
"@trackunit/serverside-utils": "0.5.356",
|
|
50
|
+
"@trackunit/migrations": "0.2.186",
|
|
51
|
+
"@trackunit/eslint-plugin-trackunit": "0.9.24"
|
|
52
52
|
},
|
|
53
53
|
"types": "./src/index.d.ts",
|
|
54
54
|
"type": "commonjs"
|
|
@@ -95,11 +95,18 @@ const IrisAppGenerator = async function (tree, options) {
|
|
|
95
95
|
"typescript-eslint": "8.71.2",
|
|
96
96
|
typescript: "6.0.2",
|
|
97
97
|
});
|
|
98
|
+
// Keep the workspace on a single React. Without these overrides npm nests a second, React 18 copy (two Reacts
|
|
99
|
+
// break hooks at runtime), because two SDK packages pull in dependencies whose React peer range stops at 18:
|
|
100
|
+
// - @trackunit/react-components -> react-helmet-async ^1.3.0 (react-helmet-async 2+ accepts React 19)
|
|
101
|
+
// - @trackunit/css-core -> react-image-gallery 1.3.0
|
|
102
|
+
// Remove both overrides once those dependencies accept React 19. Owner: Team Gluon SDK. Keep the values equal to
|
|
103
|
+
// the react and react-dom dependencies above. Workspaces keep the values written at creation; the migrate
|
|
104
|
+
// generator does not update overrides.
|
|
105
|
+
// Do not add overrides here for anything else (for example security fixes): nothing maintains them afterwards.
|
|
98
106
|
(0, devkit_1.updateJson)(tree, "package.json", packageJson => {
|
|
99
107
|
packageJson.overrides = {
|
|
100
|
-
react: "19.3.0",
|
|
101
|
-
"react-dom": "19.3.0",
|
|
102
|
-
"zod-validation-error": "4.0.2",
|
|
108
|
+
react: "19.3.0",
|
|
109
|
+
"react-dom": "19.3.0",
|
|
103
110
|
};
|
|
104
111
|
return packageJson;
|
|
105
112
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app/src/generators/create/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAWoB;AACpB,8CAA8C;AAC9C,mDAA6B;AAC7B,iF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xB,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEhC,sCAAsC;QACtC,OAAO,CAAC,GAAG,CACT,wGAAwG,CACzG,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AA9HW,QAAA,gBAAgB,oBA8H3B","sourcesContent":["import {\n addDependenciesToPackageJson,\n addProjectConfiguration,\n formatFiles,\n generateFiles,\n getWorkspaceLayout,\n installPackagesTask,\n names,\n offsetFromRoot,\n Tree,\n updateJson,\n} from \"@nx/devkit\";\nimport { getNpmScope } from \"@nx/js/internal\";\nimport * as path from \"path\";\nimport { readOwnPackageJson, type OwnPackageJson } from \"../utils/own-package-json/own-package-json\";\nimport { getPinnedVersion } from \"../utils/pinned-versions/pinned-versions\";\nimport { usesTrackunitEslintPlugin } from \"../utils/uses-trackunit-eslint-plugin\";\nimport { writeTrackunitProjectEslintConfig } from \"../utils/write-trackunit-project-eslint-config\";\nimport { IrisAppGeneratorSchema } from \"./schema\";\n\ninterface NormalizedSchema extends IrisAppGeneratorSchema {\n projectName: string;\n projectRoot: string;\n projectDirectory: string;\n toNxRoot: string;\n npmScope: string;\n}\n\nfunction normalizeOptions(tree: Tree, options: IrisAppGeneratorSchema): NormalizedSchema {\n const name = names(options.name).fileName;\n const projectDirectory = options.directory ? path.join(options.directory, name) : name;\n const toNxRoot = `../../${projectDirectory.indexOf(\"/\") !== -1 ? \"../\" : \"\"}`;\n const projectName = name.replace(new RegExp(\"/\", \"g\"), \"_\");\n const npmScope = getNpmScope(tree);\n if (!npmScope) {\n throw new Error(\"Could not find npm scope in package.json\");\n }\n const projectRoot = `${getWorkspaceLayout(tree).appsDir}/${projectDirectory}`;\n return {\n ...options,\n projectName,\n projectRoot,\n projectDirectory,\n toNxRoot,\n npmScope,\n };\n}\n\nfunction addFiles(\n tree: Tree,\n options: NormalizedSchema,\n packageJson: OwnPackageJson | null,\n useTrackunitLint: boolean\n) {\n const nodeVersion = packageJson?.engines?.node ?? \">=20.x\";\n const templateOptions = {\n ...options,\n ...names(options.name),\n offsetFromRoot: offsetFromRoot(options.projectRoot),\n template: \"\",\n nodeVersion,\n };\n generateFiles(tree, path.join(__dirname, \"files\"), options.projectRoot, templateOptions);\n if (useTrackunitLint) {\n // Must run after \"files\" so it replaces the default eslint.config.cjs.\n writeTrackunitProjectEslintConfig(tree, options.projectRoot, options.toNxRoot);\n }\n}\n\n/**\n * Iris App Generator.\n * This generator will create a new iris app, you can call this from your own generator.\n *\n * @param tree the nx tree\n * @param options the generator options\n * @returns { Promise<void> } void\n */\nexport const IrisAppGenerator = async function (tree: Tree, options: IrisAppGeneratorSchema) {\n const normalizedOptions = normalizeOptions(tree, options);\n const useTrackunitLint = usesTrackunitEslintPlugin(tree);\n\n const packageJsonLocally = readOwnPackageJson();\n\n if (options.updatePackageJson) {\n // No registry lookup: it would ignore the developer's npm release-age policy.\n // eslint-disable-next-line no-console\n console.log(\"Keep the SDK current with: npx nx g @trackunit/migrations:migrate\");\n\n const tuDependencies = {\n \"@trackunit/react-components\": getPinnedVersion(\"@trackunit/react-components\"),\n \"@trackunit/react-core-contexts\": getPinnedVersion(\"@trackunit/react-core-contexts\"),\n \"@trackunit/css-core\": getPinnedVersion(\"@trackunit/css-core\"),\n \"@trackunit/iris-app-api\": getPinnedVersion(\"@trackunit/iris-app-api\"),\n };\n\n const tuDevDependencies = {\n \"@trackunit/iris-app-sdk-vite\": getPinnedVersion(\"@trackunit/iris-app-sdk-vite\"),\n \"@trackunit/react-core-contexts-test\": getPinnedVersion(\"@trackunit/react-core-contexts-test\"),\n \"@trackunit/react-vite-test-setup\": getPinnedVersion(\"@trackunit/react-vite-test-setup\"),\n };\n\n addDependenciesToPackageJson(\n tree,\n {\n ...tuDependencies,\n \"@apollo/client\": \"3.14.1\",\n graphql: \"16.10.0\",\n \"@tanstack/react-router\": \"1.170.39\",\n tslib: \"2.4.0\",\n react: \"19.3.0\",\n \"react-dom\": \"19.3.0\",\n \"single-spa-react\": \"5.1.4\",\n },\n {\n ...tuDevDependencies,\n nx: \"23.3.0\",\n \"@nx/react\": \"23.3.0\",\n \"@nx/workspace\": \"23.3.0\",\n \"@nx/devkit\": \"23.3.0\",\n \"@nx/eslint-plugin\": \"23.3.0\",\n \"@types/react\": \"19.3.0\",\n eslint: \"9.33.0\",\n \"eslint-plugin-react-hooks\": \"7.0.1\",\n \"eslint-plugin-react\": \"7.37.5\",\n \"eslint-plugin-import\": \"2.32.0\",\n \"eslint-plugin-jsx-a11y\": \"6.10.2\",\n \"typescript-eslint\": \"8.71.2\",\n typescript: \"6.0.2\",\n }\n );\n\n updateJson(tree, \"package.json\", packageJson => {\n packageJson.overrides = {\n react: \"19.3.0\", // to avoid resolution warnings when running npm install\n \"react-dom\": \"19.3.0\", // fix resolution warnings and test\n \"zod-validation-error\": \"4.0.2\",\n };\n return packageJson;\n });\n }\n addProjectConfiguration(tree, normalizedOptions.projectName, {\n root: normalizedOptions.projectRoot,\n projectType: \"application\",\n sourceRoot: `${normalizedOptions.projectRoot}/src`,\n ...(useTrackunitLint ? { tags: [\"type:app\"] } : {}),\n targets: {\n build: {\n executor: \"@trackunit/iris-app-sdk-vite:build\",\n dependsOn: [\n {\n target: \"build\",\n params: \"forward\",\n dependencies: true,\n },\n ],\n options: {\n viteConfig: `${normalizedOptions.projectRoot}/vite.config.ts`,\n outputPath: `dist/${normalizedOptions.projectRoot}`,\n },\n outputs: [\"{options.outputPath}\"],\n },\n serve: {\n executor: \"@trackunit/iris-app-sdk-vite:serve\",\n options: {\n viteConfig: `${normalizedOptions.projectRoot}/vite.config.ts`,\n },\n outputs: [\"{options.outputPath}\"],\n },\n submitApp: {\n executor: \"@trackunit/iris-app:submit\",\n dependsOn: [\"build\"],\n options: {\n inputPath: `dist/${normalizedOptions.projectRoot}`,\n },\n outputs: [`{workspaceRoot}/dist/${normalizedOptions.projectRoot}`],\n },\n unpublishApp: {\n executor: \"@trackunit/iris-app:unpublish\",\n options: {\n inputPath: `dist/${normalizedOptions.projectRoot}`,\n },\n dependsOn: [\n {\n target: \"build\",\n },\n ],\n outputs: [`{workspaceRoot}/dist/${normalizedOptions.projectRoot}`],\n },\n },\n });\n addFiles(tree, normalizedOptions, packageJsonLocally, useTrackunitLint);\n // enforcing engine versions specified in package.json\n tree.write(\".npmrc\", \"engine-strict=true\\n\");\n\n await formatFiles(tree);\n return () => {\n installPackagesTask(tree, true);\n\n // eslint-disable-next-line no-console\n console.log(\n \"🥳 Successfully created an Iris App - review the iris-app-manifest.ts and start adding app extensions!\"\n );\n };\n};\n"]}
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app/src/generators/create/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAWoB;AACpB,8CAA8C;AAC9C,mDAA6B;AAC7B,iFAAqG;AACrG,8EAA4E;AAC5E,wFAAkF;AAClF,0GAAmG;AAWnG,SAAS,gBAAgB,CAAC,IAAU,EAAE,OAA+B;IACnE,MAAM,IAAI,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;IAC1C,MAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACvF,MAAM,QAAQ,GAAG,SAAS,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC9E,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,IAAA,sBAAW,EAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,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C,WAAW,EAAE;iBACnD;gBACD,OAAO,EAAE,CAAC,wBAAwB,iBAAiB,CAAC,WAAW,EAAE,CAAC;aACnE;YACD,YAAY,EAAE;gBACZ,QAAQ,EAAE,+BAA+B;gBACzC,OAAO,EAAE;oBACP,SAAS,EAAE,QAAQ,iBAAiB,CAAC,WAAW,EAAE;iBACnD;gBACD,SAAS,EAAE;oBACT;wBACE,MAAM,EAAE,OAAO;qBAChB;iBACF;gBACD,OAAO,EAAE,CAAC,wBAAwB,iBAAiB,CAAC,WAAW,EAAE,CAAC;aACnE;SACF;KACF,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;IACxE,sDAAsD;IACtD,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;IAE7C,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACxB,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEhC,sCAAsC;QACtC,OAAO,CAAC,GAAG,CACT,wGAAwG,CACzG,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AArIW,QAAA,gBAAgB,oBAqI3B","sourcesContent":["import {\n addDependenciesToPackageJson,\n addProjectConfiguration,\n formatFiles,\n generateFiles,\n getWorkspaceLayout,\n installPackagesTask,\n names,\n offsetFromRoot,\n Tree,\n updateJson,\n} from \"@nx/devkit\";\nimport { getNpmScope } from \"@nx/js/internal\";\nimport * as path from \"path\";\nimport { readOwnPackageJson, type OwnPackageJson } from \"../utils/own-package-json/own-package-json\";\nimport { getPinnedVersion } from \"../utils/pinned-versions/pinned-versions\";\nimport { usesTrackunitEslintPlugin } from \"../utils/uses-trackunit-eslint-plugin\";\nimport { writeTrackunitProjectEslintConfig } from \"../utils/write-trackunit-project-eslint-config\";\nimport { IrisAppGeneratorSchema } from \"./schema\";\n\ninterface NormalizedSchema extends IrisAppGeneratorSchema {\n projectName: string;\n projectRoot: string;\n projectDirectory: string;\n toNxRoot: string;\n npmScope: string;\n}\n\nfunction normalizeOptions(tree: Tree, options: IrisAppGeneratorSchema): NormalizedSchema {\n const name = names(options.name).fileName;\n const projectDirectory = options.directory ? path.join(options.directory, name) : name;\n const toNxRoot = `../../${projectDirectory.indexOf(\"/\") !== -1 ? \"../\" : \"\"}`;\n const projectName = name.replace(new RegExp(\"/\", \"g\"), \"_\");\n const npmScope = getNpmScope(tree);\n if (!npmScope) {\n throw new Error(\"Could not find npm scope in package.json\");\n }\n const projectRoot = `${getWorkspaceLayout(tree).appsDir}/${projectDirectory}`;\n return {\n ...options,\n projectName,\n projectRoot,\n projectDirectory,\n toNxRoot,\n npmScope,\n };\n}\n\nfunction addFiles(\n tree: Tree,\n options: NormalizedSchema,\n packageJson: OwnPackageJson | null,\n useTrackunitLint: boolean\n) {\n const nodeVersion = packageJson?.engines?.node ?? \">=20.x\";\n const templateOptions = {\n ...options,\n ...names(options.name),\n offsetFromRoot: offsetFromRoot(options.projectRoot),\n template: \"\",\n nodeVersion,\n };\n generateFiles(tree, path.join(__dirname, \"files\"), options.projectRoot, templateOptions);\n if (useTrackunitLint) {\n // Must run after \"files\" so it replaces the default eslint.config.cjs.\n writeTrackunitProjectEslintConfig(tree, options.projectRoot, options.toNxRoot);\n }\n}\n\n/**\n * Iris App Generator.\n * This generator will create a new iris app, you can call this from your own generator.\n *\n * @param tree the nx tree\n * @param options the generator options\n * @returns { Promise<void> } void\n */\nexport const IrisAppGenerator = async function (tree: Tree, options: IrisAppGeneratorSchema) {\n const normalizedOptions = normalizeOptions(tree, options);\n const useTrackunitLint = usesTrackunitEslintPlugin(tree);\n\n const packageJsonLocally = readOwnPackageJson();\n\n if (options.updatePackageJson) {\n // No registry lookup: it would ignore the developer's npm release-age policy.\n // eslint-disable-next-line no-console\n console.log(\"Keep the SDK current with: npx nx g @trackunit/migrations:migrate\");\n\n const tuDependencies = {\n \"@trackunit/react-components\": getPinnedVersion(\"@trackunit/react-components\"),\n \"@trackunit/react-core-contexts\": getPinnedVersion(\"@trackunit/react-core-contexts\"),\n \"@trackunit/css-core\": getPinnedVersion(\"@trackunit/css-core\"),\n \"@trackunit/iris-app-api\": getPinnedVersion(\"@trackunit/iris-app-api\"),\n };\n\n const tuDevDependencies = {\n \"@trackunit/iris-app-sdk-vite\": getPinnedVersion(\"@trackunit/iris-app-sdk-vite\"),\n \"@trackunit/react-core-contexts-test\": getPinnedVersion(\"@trackunit/react-core-contexts-test\"),\n \"@trackunit/react-vite-test-setup\": getPinnedVersion(\"@trackunit/react-vite-test-setup\"),\n };\n\n addDependenciesToPackageJson(\n tree,\n {\n ...tuDependencies,\n \"@apollo/client\": \"3.14.1\",\n graphql: \"16.10.0\",\n \"@tanstack/react-router\": \"1.170.39\",\n tslib: \"2.4.0\",\n react: \"19.3.0\",\n \"react-dom\": \"19.3.0\",\n \"single-spa-react\": \"5.1.4\",\n },\n {\n ...tuDevDependencies,\n nx: \"23.3.0\",\n \"@nx/react\": \"23.3.0\",\n \"@nx/workspace\": \"23.3.0\",\n \"@nx/devkit\": \"23.3.0\",\n \"@nx/eslint-plugin\": \"23.3.0\",\n \"@types/react\": \"19.3.0\",\n eslint: \"9.33.0\",\n \"eslint-plugin-react-hooks\": \"7.0.1\",\n \"eslint-plugin-react\": \"7.37.5\",\n \"eslint-plugin-import\": \"2.32.0\",\n \"eslint-plugin-jsx-a11y\": \"6.10.2\",\n \"typescript-eslint\": \"8.71.2\",\n typescript: \"6.0.2\",\n }\n );\n\n // Keep the workspace on a single React. Without these overrides npm nests a second, React 18 copy (two Reacts\n // break hooks at runtime), because two SDK packages pull in dependencies whose React peer range stops at 18:\n // - @trackunit/react-components -> react-helmet-async ^1.3.0 (react-helmet-async 2+ accepts React 19)\n // - @trackunit/css-core -> react-image-gallery 1.3.0\n // Remove both overrides once those dependencies accept React 19. Owner: Team Gluon SDK. Keep the values equal to\n // the react and react-dom dependencies above. Workspaces keep the values written at creation; the migrate\n // generator does not update overrides.\n // Do not add overrides here for anything else (for example security fixes): nothing maintains them afterwards.\n updateJson(tree, \"package.json\", packageJson => {\n packageJson.overrides = {\n react: \"19.3.0\",\n \"react-dom\": \"19.3.0\",\n };\n return packageJson;\n });\n }\n addProjectConfiguration(tree, normalizedOptions.projectName, {\n root: normalizedOptions.projectRoot,\n projectType: \"application\",\n sourceRoot: `${normalizedOptions.projectRoot}/src`,\n ...(useTrackunitLint ? { tags: [\"type:app\"] } : {}),\n targets: {\n build: {\n executor: \"@trackunit/iris-app-sdk-vite:build\",\n dependsOn: [\n {\n target: \"build\",\n params: \"forward\",\n dependencies: true,\n },\n ],\n options: {\n viteConfig: `${normalizedOptions.projectRoot}/vite.config.ts`,\n outputPath: `dist/${normalizedOptions.projectRoot}`,\n },\n outputs: [\"{options.outputPath}\"],\n },\n serve: {\n executor: \"@trackunit/iris-app-sdk-vite:serve\",\n options: {\n viteConfig: `${normalizedOptions.projectRoot}/vite.config.ts`,\n },\n outputs: [\"{options.outputPath}\"],\n },\n submitApp: {\n executor: \"@trackunit/iris-app:submit\",\n dependsOn: [\"build\"],\n options: {\n inputPath: `dist/${normalizedOptions.projectRoot}`,\n },\n outputs: [`{workspaceRoot}/dist/${normalizedOptions.projectRoot}`],\n },\n unpublishApp: {\n executor: \"@trackunit/iris-app:unpublish\",\n options: {\n inputPath: `dist/${normalizedOptions.projectRoot}`,\n },\n dependsOn: [\n {\n target: \"build\",\n },\n ],\n outputs: [`{workspaceRoot}/dist/${normalizedOptions.projectRoot}`],\n },\n },\n });\n addFiles(tree, normalizedOptions, packageJsonLocally, useTrackunitLint);\n // enforcing engine versions specified in package.json\n tree.write(\".npmrc\", \"engine-strict=true\\n\");\n\n await formatFiles(tree);\n return () => {\n installPackagesTask(tree, true);\n\n // eslint-disable-next-line no-console\n console.log(\n \"🥳 Successfully created an Iris App - review the iris-app-manifest.ts and start adding app extensions!\"\n );\n };\n};\n"]}
|