From 69f597c9560ddd89772c312d65153c05654ead2b Mon Sep 17 00:00:00 2001 From: Wil Wilsman Date: Thu, 8 Apr 2021 17:03:33 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20meta=20module=20exports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon-test-support/@percy/ember/index.js | 6 +++--- index.js | 2 +- tests/acceptance/index-test.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addon-test-support/@percy/ember/index.js b/addon-test-support/@percy/ember/index.js index c2dcfa3c..073f339a 100644 --- a/addon-test-support/@percy/ember/index.js +++ b/addon-test-support/@percy/ember/index.js @@ -1,16 +1,16 @@ import utils from '@percy/sdk-utils'; import { VERSION as emberVersion } from '@ember/version'; -import { VERSION as sdkVersion, PERCY_SERVER_ADDRESS } from '@percy/ember/meta'; +import SDKENV from '@percy/ember/env'; // Collect client and environment information -const CLIENT_INFO = `@percy/ember/${sdkVersion}`; +const CLIENT_INFO = `@percy/ember/${SDKENV.VERSION}`; const ENV_INFO = [`ember/${emberVersion}`]; if (window.QUnit) ENV_INFO.push(`qunit/${window.QUnit.version}`); if (window.mocha) ENV_INFO.push(`mocha/${window.mocha.version}`); // Maybe set the CLI API address from the environment -utils.percy.address = PERCY_SERVER_ADDRESS; +utils.percy.address = SDKENV.PERCY_SERVER_ADDRESS; // Helper to generate a snapshot name from the test suite function generateName(assertOrTestOrName) { diff --git a/index.js b/index.js index 2f78e1bf..343b3290 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ module.exports = { }, treeForAddonTestSupport(tree) { - let meta = new WriteFile('@percy/ember/meta.js', ( + let meta = new WriteFile('@percy/ember/env.js', ( `export default ${JSON.stringify({ VERSION: pkg.version, PERCY_SERVER_ADDRESS: process.env.PERCY_SERVER_ADDRESS diff --git a/tests/acceptance/index-test.js b/tests/acceptance/index-test.js index a2f49183..1afd2c69 100644 --- a/tests/acceptance/index-test.js +++ b/tests/acceptance/index-test.js @@ -62,7 +62,7 @@ module('percySnapshot', hooks => { assert.equal(reqs[2][1].name, 'Snapshot 1'); assert.matches(reqs[2][1].url, /^http:\/\/localhost:7357/); assert.matches(reqs[2][1].domSnapshot, /<\/body>/); - assert.matches(reqs[2][1].clientInfo, /@percy\/ember\/.+/); + assert.matches(reqs[2][1].clientInfo, /@percy\/ember\/\d.+/); assert.matches(reqs[2][1].environmentInfo[0], /ember\/.+/); assert.matches(reqs[2][1].environmentInfo[1], /qunit\/.+/);