'use strict';

const getChannelURL = require('ember-source-channel-url');
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
  return {
    useYarn: true,
    scenarios: [
      {
        name: 'ember-lts-3.8',
        npm: {
          devDependencies: {
            'ember-source': '~3.8.0',
            'ember-angle-bracket-invocation-polyfill': '^3.0.0',
            'ember-decorators-polyfill': '^1.1.5',
            'ember-on-modifier': '^1.0.1',
          },
        },
      },
      {
        name: 'ember-lts-3.12',
        npm: {
          devDependencies: {
            'ember-source': '~3.12.0',
          },
        },
      },
      {
        name: 'ember-lts-3.16',
        npm: {
          devDependencies: {
            'ember-source': '~3.16.0',
          },
        },
      },
      {
        name: 'ember-lts-3.20',
        npm: {
          devDependencies: {
            'ember-source': '~3.20.5',
          },
        },
      },
      {
        name: 'ember-lts-3.24',
        npm: {
          devDependencies: {
            'ember-source': '~3.24.3',
          },
        },
      },
      {
        name: 'ember-release',
        npm: {
          devDependencies: {
            'ember-source': await getChannelURL('release'),
          },
        },
      },
      {
        name: 'ember-beta',
        npm: {
          devDependencies: {
            'ember-source': await getChannelURL('beta'),
          },
        },
      },
      {
        name: 'ember-canary',
        npm: {
          devDependencies: {
            'ember-source': await getChannelURL('canary'),
          },
        },
      },
      {
        name: 'ember-default',
        npm: {
          devDependencies: {},
        },
      },
      {
        name: 'typescript-3.7',
        npm: {
          devDependencies: {
            typescript: '~3.7.0',
          },
        },
        command: 'tsc',
      },
      {
        name: 'typescript-3.9',
        npm: {
          devDependencies: {
            typescript: '~3.9.0',
          },
        },
        command: 'tsc',
      },
      embroiderSafe(),
      embroiderOptimized(),
    ],
  };
};

@@ -1478,24 +1478,98 @@
 RL('beta'),%0A
+            'ember-auto-import': '%5E2.0.0',%0A            webpack: '%5E5.0.0',%0A
           %7D,
@@ -1726,24 +1726,98 @@
 ('canary'),%0A
+            'ember-auto-import': '%5E2.0.0',%0A            webpack: '%5E5.0.0',%0A
           %7D,

Use ember-auto-import 2 in beta & canary scenarios