@scandipwa/magento-scripts 2.3.5 → 2.3.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.
@@ -366,17 +366,27 @@ const configureSearchEngine = () => ({
366
366
  task: async (ctx, task) => {
367
367
  const { searchengine = 'elasticsearch' } =
368
368
  ctx.config.overridenConfiguration.configuration
369
+ const pureMagentoVersion = ctx.magentoVersion.match(
370
+ /^([0-9]+\.[0-9]+\.[0-9]+)/
371
+ )[1]
369
372
 
370
373
  if (searchengine === 'opensearch') {
371
374
  return task.newListr(configureOpenSearchInDatabase())
372
375
  }
373
376
 
374
- const { major: parsedESMajorVersion } = semver.parse(
375
- ctx.elasticSearchVersion
376
- ) || { major: 7 }
377
+ const isMagento246 = semver.eq(pureMagentoVersion, '2.4.6')
378
+
379
+ const getParsedESMajorVersion = () => {
380
+ const { major: parsedESMajorVersion } = semver.parse(
381
+ ctx.elasticSearchVersion
382
+ ) || { major: 7 }
383
+
384
+ return parsedESMajorVersion
385
+ }
377
386
 
378
387
  if (
379
- parsedESMajorVersion === 8 &&
388
+ isMagento246 &&
389
+ getParsedESMajorVersion() === 8 &&
380
390
  (await isNeedToInstallElasticSearch8Module(ctx))
381
391
  ) {
382
392
  return task.newListr([
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Scripts and configuration used by CMA.",
4
4
  "homepage": "https://docs.create-magento-app.com/",
5
5
  "repository": "github:scandipwa/create-magento-app",
6
- "version": "2.3.5",
6
+ "version": "2.3.6",
7
7
  "main": "./index.js",
8
8
  "types": "./typings/index.d.ts",
9
9
  "license": "OSL-3.0",
@@ -59,5 +59,5 @@
59
59
  "@types/node": "^20.10.4",
60
60
  "@types/yargs": "^17.0.13"
61
61
  },
62
- "gitHead": "9a6cd2c744bdd9719572a8298df4a0d7aa47ffb7"
62
+ "gitHead": "34550a6463f6b9c33f766805a0b58b3a5aae0bba"
63
63
  }