From b4aaa75e5123002ede7bb455252f6af72f7a26de Mon Sep 17 00:00:00 2001 From: vzhang03 Date: Mon, 8 Jul 2024 16:45:04 -0400 Subject: [PATCH] Fixing tests by moving extension data processing to v8-metadata branch --- packages/jspsych/src/ExtensionManager.ts | 9 --------- packages/jspsych/src/modules/extensions.ts | 2 -- .../jspsych/tests/extensions/test-extension.ts | 2 +- packages/metadata/src/index.ts | 14 +++++++------- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/packages/jspsych/src/ExtensionManager.ts b/packages/jspsych/src/ExtensionManager.ts index 75802759d2..02ce60d2fc 100644 --- a/packages/jspsych/src/ExtensionManager.ts +++ b/packages/jspsych/src/ExtensionManager.ts @@ -67,15 +67,6 @@ export class ExtensionManager { ) ); - const extensionInfo = trialExtensionsConfiguration.length - ? { - extension_type: results.map((result) => result.extension_type), - extension_version: results.map((result) => result.extension_version), - } - : {}; - - results.push(extensionInfo); - return Object.assign({}, ...results); } } diff --git a/packages/jspsych/src/modules/extensions.ts b/packages/jspsych/src/modules/extensions.ts index 74b59954c8..e0e283cfaa 100644 --- a/packages/jspsych/src/modules/extensions.ts +++ b/packages/jspsych/src/modules/extensions.ts @@ -1,7 +1,5 @@ export interface JsPsychExtensionInfo { name: string; - version: string; - data: Record; } export interface JsPsychExtension { diff --git a/packages/jspsych/tests/extensions/test-extension.ts b/packages/jspsych/tests/extensions/test-extension.ts index d7391daada..e7c7a3f16b 100644 --- a/packages/jspsych/tests/extensions/test-extension.ts +++ b/packages/jspsych/tests/extensions/test-extension.ts @@ -1,4 +1,4 @@ -import { JsPsych, JsPsychExtension } from "../../src"; +import { JsPsych, JsPsychExtension, ParameterType } from "../../src"; export class TestExtension implements JsPsychExtension { static info = { diff --git a/packages/metadata/src/index.ts b/packages/metadata/src/index.ts index ade4e1d40d..fb9dd78ac9 100644 --- a/packages/metadata/src/index.ts +++ b/packages/metadata/src/index.ts @@ -320,13 +320,13 @@ export default class JsPsychMetadata { if (ignored_fields.has(variable)) this.updateFields(variable, value, typeof value); else { await this.generateMetadata(variable, value, pluginType, version); - if (extensionType) { - await Promise.all( - extensionType.map((ext, index) => - this.generateMetadata(variable, value, ext, extensionVersion[index]) - ) - ); - } + // if (extensionType) { + // await Promise.all( + // extensionType.map((ext, index) => + // this.generateMetadata(variable, value, ext, extensionVersion[index]) + // ) + // ); + // } } } }