@sap-ux/app-config-writer 0.6.117 → 0.6.119
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.
|
@@ -43,11 +43,15 @@ async function checkPrerequisites(basePath, fs, logger) {
|
|
|
43
43
|
logger?.error(`No package.json found at path '${packageJsonPath}'`);
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
if (eslintExists) {
|
|
46
|
+
if ((0, project_access_1.hasDependency)(packageJson, 'eslint')) {
|
|
48
47
|
logger?.error(`EsLint already exists in this project. Found 'eslint' dependency in package.json at path '${packageJsonPath}'`);
|
|
49
48
|
return false;
|
|
50
49
|
}
|
|
50
|
+
const eslintConfigFilePath = (0, node_path_1.join)(basePath, 'eslint.config.mjs');
|
|
51
|
+
if (fs.exists(eslintConfigFilePath)) {
|
|
52
|
+
logger?.error(`An ESLint configuration file already exists at path '${eslintConfigFilePath}'`);
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
51
55
|
return true;
|
|
52
56
|
}
|
|
53
57
|
/**
|
|
@@ -138,15 +138,15 @@ async function injectFioriToolsIntoMigratedConfig(basePath, fs, config = 'recomm
|
|
|
138
138
|
content = importStatement + content;
|
|
139
139
|
}
|
|
140
140
|
const lastBracketIndex = content.lastIndexOf(']);');
|
|
141
|
-
if (lastBracketIndex
|
|
141
|
+
if (lastBracketIndex === -1) {
|
|
142
|
+
throw new Error('Unexpected format of migrated eslint config. Could not inject the SAP Fiori tools plugin configuration.');
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
142
145
|
content =
|
|
143
146
|
content.slice(0, lastBracketIndex) +
|
|
144
147
|
`,\n ...fioriTools.configs['${config}'],\n` +
|
|
145
148
|
content.slice(lastBracketIndex);
|
|
146
149
|
}
|
|
147
|
-
else {
|
|
148
|
-
throw new Error('Unexpected format of migrated eslint config. Could not inject the SAP Fiori tools plugin configuration.');
|
|
149
|
-
}
|
|
150
150
|
fs.write(migratedConfigPath, content);
|
|
151
151
|
logger?.debug(`Injected SAP Fiori tools plugin into ${migratedConfigPath}`);
|
|
152
152
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/app-config-writer",
|
|
3
3
|
"description": "Add or update configuration for SAP Fiori tools application",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.119",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@sap-ux/ui5-application-writer": "1.7.19",
|
|
33
33
|
"@sap-ux/btp-utils": "1.1.9",
|
|
34
34
|
"@sap-ux/logger": "0.8.2",
|
|
35
|
-
"@sap-ux/project-access": "1.35.
|
|
35
|
+
"@sap-ux/project-access": "1.35.13",
|
|
36
36
|
"@sap-ux/store": "1.5.9",
|
|
37
37
|
"@sap-ux/ui5-config": "0.29.21"
|
|
38
38
|
},
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@types/cross-spawn": "6.0.6",
|
|
46
46
|
"axios": "1.13.5",
|
|
47
47
|
"nock": "13.4.0",
|
|
48
|
-
"@sap-ux/preview-middleware": "0.23.
|
|
48
|
+
"@sap-ux/preview-middleware": "0.23.147"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=20.x"
|