expo-test-runner 0.0.7 → 0.0.8

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.
File without changes
@@ -4,7 +4,6 @@ import { ProjectFile } from '../TemplateFile';
4
4
  import PresetTemplate from './PresetTemplate';
5
5
  export default class DetoxPreset extends PresetTemplate {
6
6
  getDependencies(): Dependency[];
7
- getDevDependencies(): Dependency[];
8
7
  getDefinitions(): Definitions;
9
8
  getTemplateFiles(): {
10
9
  [path: string]: ProjectFile;
@@ -19,15 +19,6 @@ class DetoxPreset extends PresetTemplate_1.default {
19
19
  },
20
20
  ];
21
21
  }
22
- getDevDependencies() {
23
- return [
24
- ...super.getDevDependencies(),
25
- {
26
- name: '@types/react-native',
27
- path: this.config.reactNativeVersion,
28
- },
29
- ];
30
- }
31
22
  getDefinitions() {
32
23
  return {
33
24
  ...super.getDefinitions(),
@@ -1 +1 @@
1
- {"version":3,"file":"DetoxTemplate.js","sourceRoot":"","sources":["../../src/presets/DetoxTemplate.ts"],"names":[],"mappings":";;;;;AAAA,oEAA2C;AAG3C,6EAAqD;AAErD,0CAAuC;AACvC,kDAA8E;AAC9E,oCAAmD;AACnD,sEAA8C;AAE9C,MAAqB,WAAY,SAAQ,wBAAc;IAC5C,eAAe;QACtB,OAAO;YACL,GAAG,KAAK,CAAC,eAAe,EAAE;YAC1B;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;aACf;SACF,CAAC;IACJ,CAAC;IAEQ,kBAAkB;QACzB,OAAO;YACL,GAAG,KAAK,CAAC,kBAAkB,EAAE;YAC7B;gBACE,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB;aACrC;SACF,CAAC;IACJ,CAAC;IAEQ,cAAc;QACrB,OAAO;YACL,GAAG,KAAK,CAAC,cAAc,EAAE;YACzB,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;SACzC,CAAC;I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AE;gBACvD,GAAG,EAAE,WAAW;gBAChB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,KAAK,CAAC,GAAG,CAAC,WAAmB,EAAE,IAAe;QACrD,IAAI,OAAsC,CAAC;QAC3C,IAAI;YACF,OAAO,GAAG,IAAI,2BAAiB,CAAC,WAAW,CAAC,CAAC;YAE7C,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBACzB,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;aACvB;YAED,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,EAAE;gBACtC,MAAM,qBAAU,CACd,MAAM,EACN,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,sBAAsB,CAAC,EACpF;oBACE,GAAG,EAAE,WAAW;oBAChB,KAAK,EAAE,SAAS;iBACjB,CACF,CAAC;gBAEF,MAAM,+BAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC9C;SACF;gBAAS;YACR,qCAAqC;YACrC,MAAM,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAE,CAAA,CAAC;SACvB;IACH,CAAC;CACF;AAzFD,8BAyFC","sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport { Definitions } from 'dot';\n\nimport BundlerController from '../BundlerController';\nimport { Dependency, DetoxTest } from '../Config';\nimport { Platform } from '../Platform';\nimport { ProjectFile, TemplateFilesFactory, UserFile } from '../TemplateFile';\nimport { killVirtualDevicesAsync } from '../Utils';\nimport PresetTemplate from './PresetTemplate';\n\nexport default class DetoxPreset extends PresetTemplate {\n override getDependencies(): Dependency[] {\n return [\n ...super.getDependencies(),\n {\n name: 'detox',\n path: '19.1.0',\n },\n ];\n }\n\n override getDevDependencies(): Dependency[] {\n return [\n ...super.getDevDependencies(),\n {\n name: '@types/react-native',\n path: this.config.reactNativeVersion,\n },\n ];\n }\n\n override getDefinitions(): Definitions {\n return {\n ...super.getDefinitions(),\n appEntryPoint: this.config.appEntryPoint,\n };\n }\n override getTemplateFiles(): { [path: string]: ProjectFile } {\n const tff = new TemplateFilesFactory('detox');\n\n const additionalFiles: { [path: string]: ProjectFile } = this.config.additionalFiles?.reduce(\n (reducer, file) => ({\n ...reducer,\n [file]: new UserFile(this.userFilePath(file)),\n }),\n {}\n );\n\n if (this.config.android?.detoxTestFile) {\n additionalFiles['android/app/src/androidTest/java/com/testrunner/DetoxTest.java'] =\n new UserFile(this.userFilePath(this.config.android.detoxTestFile), Platform.Android);\n }\n\n return {\n ...super.getTemplateFiles(),\n 'android/build.gradle': tff.androidFile(),\n 'android/app/build.gradle': tff.androidFile(),\n 'android/app/src/androidTest/java/com/testrunner/DetoxTest.java': tff.androidFile(),\n 'index.js': tff.file(true),\n [this.config.detoxConfigFile]: new UserFile(this.userFilePath(this.config.detoxConfigFile)),\n ...additionalFiles,\n };\n }\n\n override async build(projectPath: string, test: DetoxTest): Promise<void> {\n for (const conf of test.configurations) {\n await spawnAsync('yarn', ['detox', 'build', '-c', conf], {\n cwd: projectPath,\n stdio: 'inherit',\n });\n }\n }\n\n override async run(projectPath: string, test: DetoxTest): Promise<void> {\n let bundler: BundlerController | undefined;\n try {\n bundler = new BundlerController(projectPath);\n\n if (test.shouldRunBundler) {\n await bundler.start();\n }\n\n for (const conf of test.configurations) {\n await spawnAsync(\n 'yarn',\n ['detox', 'test', '-c', conf, '--ci', '--headless', '--gpu', 'swiftshader_indirect'],\n {\n cwd: projectPath,\n stdio: 'inherit',\n }\n );\n\n await killVirtualDevicesAsync(this.platform);\n }\n } finally {\n // If bundler wasn't started is noop.\n await bundler?.stop();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"DetoxTemplate.js","sourceRoot":"","sources":["../../src/presets/DetoxTemplate.ts"],"names":[],"mappings":";;;;;AAAA,oEAA2C;AAG3C,6EAAqD;AAErD,0CAAuC;AACvC,kDAA8E;AAC9E,oCA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AAQ,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YAC3F,GAAG,eAAe;SACnB,CAAC;IACJ,CAAC;IAEQ,KAAK,CAAC,KAAK,CAAC,WAAmB,EAAE,IAAe;QACvD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,EAAE;YACtC,MAAM,qBAAU,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;gBACvD,GAAG,EAAE,WAAW;gBAChB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,KAAK,CAAC,GAAG,CAAC,WAAmB,EAAE,IAAe;QACrD,IAAI,OAAsC,CAAC;QAC3C,IAAI;YACF,OAAO,GAAG,IAAI,2BAAiB,CAAC,WAAW,CAAC,CAAC;YAE7C,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBACzB,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;aACvB;YAED,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,EAAE;gBACtC,MAAM,qBAAU,CACd,MAAM,EACN,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,sBAAsB,CAAC,EACpF;oBACE,GAAG,EAAE,WAAW;oBAChB,KAAK,EAAE,SAAS;iBACjB,CACF,CAAC;gBAEF,MAAM,+BAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC9C;SACF;gBAAS;YACR,qCAAqC;YACrC,MAAM,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAE,CAAA,CAAC;SACvB;IACH,CAAC;CACF;AA/ED,8BA+EC","sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport { Definitions } from 'dot';\n\nimport BundlerController from '../BundlerController';\nimport { Dependency, DetoxTest } from '../Config';\nimport { Platform } from '../Platform';\nimport { ProjectFile, TemplateFilesFactory, UserFile } from '../TemplateFile';\nimport { killVirtualDevicesAsync } from '../Utils';\nimport PresetTemplate from './PresetTemplate';\n\nexport default class DetoxPreset extends PresetTemplate {\n override getDependencies(): Dependency[] {\n return [\n ...super.getDependencies(),\n {\n name: 'detox',\n path: '19.1.0',\n },\n ];\n }\n\n override getDefinitions(): Definitions {\n return {\n ...super.getDefinitions(),\n appEntryPoint: this.config.appEntryPoint,\n };\n }\n override getTemplateFiles(): { [path: string]: ProjectFile } {\n const tff = new TemplateFilesFactory('detox');\n\n const additionalFiles: { [path: string]: ProjectFile } = this.config.additionalFiles?.reduce(\n (reducer, file) => ({\n ...reducer,\n [file]: new UserFile(this.userFilePath(file)),\n }),\n {}\n );\n\n if (this.config.android?.detoxTestFile) {\n additionalFiles['android/app/src/androidTest/java/com/testrunner/DetoxTest.java'] =\n new UserFile(this.userFilePath(this.config.android.detoxTestFile), Platform.Android);\n }\n\n return {\n ...super.getTemplateFiles(),\n 'android/build.gradle': tff.androidFile(),\n 'android/app/build.gradle': tff.androidFile(),\n 'android/app/src/androidTest/java/com/testrunner/DetoxTest.java': tff.androidFile(),\n 'index.js': tff.file(true),\n [this.config.detoxConfigFile]: new UserFile(this.userFilePath(this.config.detoxConfigFile)),\n ...additionalFiles,\n };\n }\n\n override async build(projectPath: string, test: DetoxTest): Promise<void> {\n for (const conf of test.configurations) {\n await spawnAsync('yarn', ['detox', 'build', '-c', conf], {\n cwd: projectPath,\n stdio: 'inherit',\n });\n }\n }\n\n override async run(projectPath: string, test: DetoxTest): Promise<void> {\n let bundler: BundlerController | undefined;\n try {\n bundler = new BundlerController(projectPath);\n\n if (test.shouldRunBundler) {\n await bundler.start();\n }\n\n for (const conf of test.configurations) {\n await spawnAsync(\n 'yarn',\n ['detox', 'test', '-c', conf, '--ci', '--headless', '--gpu', 'swiftshader_indirect'],\n {\n cwd: projectPath,\n stdio: 'inherit',\n }\n );\n\n await killVirtualDevicesAsync(this.platform);\n }\n } finally {\n // If bundler wasn't started is noop.\n await bundler?.stop();\n }\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-test-runner",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Script that enchants test experience.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -19,16 +19,6 @@ export default class DetoxPreset extends PresetTemplate {
19
19
  ];
20
20
  }
21
21
 
22
- override getDevDependencies(): Dependency[] {
23
- return [
24
- ...super.getDevDependencies(),
25
- {
26
- name: '@types/react-native',
27
- path: this.config.reactNativeVersion,
28
- },
29
- ];
30
- }
31
-
32
22
  override getDefinitions(): Definitions {
33
23
  return {
34
24
  ...super.getDefinitions(),
@@ -24,5 +24,14 @@ target '{{= it.name }}' do
24
24
  config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
25
25
  end
26
26
  end
27
+
28
+ installer.pods_project.targets.each do |target|
29
+ case target.name
30
+ when 'RCT-Folly'
31
+ target.build_configurations.each do |config|
32
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
33
+ end
34
+ end
35
+ end
27
36
  end
28
37
  end