diff --git a/packages/env-options/README.md b/packages/env-options/README.md index 1dc361eb95..a6cb7aa739 100644 --- a/packages/env-options/README.md +++ b/packages/env-options/README.md @@ -74,3 +74,8 @@ if (capturedEnvironmentOptionNames.length > 0) { ); } ``` + +# Note of test migration + +To reduce cyclic dependencies, the tests of this module have been moved to +@endo/ses-ava. Doing `yarn test` here currently does nothing. diff --git a/packages/env-options/package.json b/packages/env-options/package.json index bdf56e4921..bc2168b9e8 100644 --- a/packages/env-options/package.json +++ b/packages/env-options/package.json @@ -32,11 +32,9 @@ "lint:types": "tsc", "build:types": "tsc --build tsconfig.build.json", "clean:types": "git clean -f '*.d.ts*'", - "test": "ava" + "test": "exit 0" }, "devDependencies": { - "@endo/init": "^1.0.0", - "@endo/ses-ava": "^1.0.0", "ava": "^5.3.0", "babel-eslint": "^10.0.3", "eslint": "^8.46.0", diff --git a/packages/env-options/test/prepare-test-env-ava.js b/packages/env-options/test/prepare-test-env-ava.js deleted file mode 100644 index f5ed7c0c84..0000000000 --- a/packages/env-options/test/prepare-test-env-ava.js +++ /dev/null @@ -1,9 +0,0 @@ -// eslint-disable-next-line import/no-extraneous-dependencies -import '@endo/init/debug.js'; - -// eslint-disable-next-line import/no-extraneous-dependencies -import { wrapTest } from '@endo/ses-ava'; -import rawTest from 'ava'; - -/** @type {typeof rawTest} */ -export const test = wrapTest(rawTest); diff --git a/packages/lockdown/package.json b/packages/lockdown/package.json index a851b5e46a..6e2c92ca08 100644 --- a/packages/lockdown/package.json +++ b/packages/lockdown/package.json @@ -12,9 +12,6 @@ "lint-fix": "eslint --fix '**/*.js'", "lint": "eslint '**/*.js'" }, - "devDependencies": { - "ava": "^5.1.1" - }, "dependencies": { "ses": "^1.0.0" }, diff --git a/packages/ses-ava/package.json b/packages/ses-ava/package.json index 08c6659507..0c56e90839 100644 --- a/packages/ses-ava/package.json +++ b/packages/ses-ava/package.json @@ -38,6 +38,8 @@ "ses": "^1.0.0" }, "devDependencies": { + "@endo/env-options": "^1.0.0", + "@endo/lockdown": "^1.0.0", "ava": "^5.3.0", "babel-eslint": "^10.0.3", "c8": "^7.14.0", diff --git a/packages/ses-ava/test/prepare-test-env-ava.js b/packages/ses-ava/test/prepare-test-env-ava.js new file mode 100644 index 0000000000..e83f4928c7 --- /dev/null +++ b/packages/ses-ava/test/prepare-test-env-ava.js @@ -0,0 +1,7 @@ +import '@endo/lockdown/commit-debug.js'; + +import rawTest from 'ava'; +import { wrapTest } from '../src/ses-ava-test.js'; + +/** @type {typeof rawTest} */ +export const test = wrapTest(rawTest); diff --git a/packages/env-options/test/test-env-options.js b/packages/ses-ava/test/test-env-options.js similarity index 94% rename from packages/env-options/test/test-env-options.js rename to packages/ses-ava/test/test-env-options.js index 923ada74ab..fa2ba3d357 100644 --- a/packages/env-options/test/test-env-options.js +++ b/packages/ses-ava/test/test-env-options.js @@ -1,5 +1,5 @@ import { test } from './prepare-test-env-ava.js'; -import { makeEnvironmentCaptor } from '../src/env-options.js'; +import { makeEnvironmentCaptor } from '@endo/env-options'; test('test env options empty env', async t => { const c1 = new Compartment(); diff --git a/yarn.lock b/yarn.lock index fabcf2b672..786e6436d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -743,6 +743,41 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@endo/env-options@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@endo/env-options/-/env-options-0.1.4.tgz#e516bc3864f00b154944e444fb8996a9a0c23a45" + integrity sha512-Ol8ct0aW8VK1ZaqntnUJfrYT59P6Xn36XPbHzkqQhsYkpudKDn5ILYEwGmSO/Ff+XJjv/pReNI0lhOyyrDa9mg== + +"@endo/eventual-send@^0.17.6": + version "0.17.6" + resolved "https://registry.yarnpkg.com/@endo/eventual-send/-/eventual-send-0.17.6.tgz#86719e4e3ff76991c49f6680309dc77dff65fe55" + integrity sha512-73cKY2uiWdzMJn7i284NJyD3K0UKjpksBg/EA2GT8YJa0TgeBczFQIm81vC08itK5gHuDDH2vC5COSGR6hxKIg== + dependencies: + "@endo/env-options" "^0.1.4" + +"@endo/far@^0.2.3": + version "0.2.22" + resolved "https://registry.yarnpkg.com/@endo/far/-/far-0.2.22.tgz#fda187289a903ee3f9d6dcc5664ee7fef1994b1f" + integrity sha512-LFOicqyHslKOSk/H5EfGOcw347ftDSwYHARPasnrG4UJOEkcU1ZG5bN/BmfONtcidB776gWZKrV/tNl4WLIlyw== + dependencies: + "@endo/eventual-send" "^0.17.6" + "@endo/pass-style" "^0.1.7" + +"@endo/pass-style@^0.1.7": + version "0.1.7" + resolved "https://registry.yarnpkg.com/@endo/pass-style/-/pass-style-0.1.7.tgz#ea22568e8b86fb2d1a14a5fc042374cc0d8e310b" + integrity sha512-dlB62Ptjcy/+iachy7qzAdgIwaU60rE+XLummLRpE2tDSJF2jSFJlVwa/QuGw1KKO7Rt4vog/51sKev3EbJZQg== + dependencies: + "@endo/promise-kit" "^0.2.60" + "@fast-check/ava" "^1.1.5" + +"@endo/promise-kit@^0.2.60": + version "0.2.60" + resolved "https://registry.yarnpkg.com/@endo/promise-kit/-/promise-kit-0.2.60.tgz#8012ada06970c7eaf965cd856563b34a1790e163" + integrity sha512-6Zp9BqBbc3ywaG+iLRrQRmO/VLKrMnvsbgOKKPMpjEC3sUlksYA09uaH3GrKZgoGChF8m9bXK8eFW39z7wJNUw== + dependencies: + ses "^0.18.8" + "@es-joy/jsdoccomment@~0.39.4": version "0.39.4" resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.39.4.tgz#6b8a62e9b3077027837728818d3c4389a898b392" @@ -10960,6 +10995,13 @@ serve-static@^1.12.4: parseurl "~1.3.3" send "0.18.0" +ses@^0.18.8: + version "0.18.8" + resolved "https://registry.yarnpkg.com/ses/-/ses-0.18.8.tgz#88036511ac3b3c07e4d82dd8cfc6e5f3788205b6" + integrity sha512-kOH1AhJc6gWDXKURKeU1w7iFUdImAegAljVvBg5EUBgNqjH4bxcEsGVUadVEPtA2PVRMyQp1fiSMDwEZkQNj1g== + dependencies: + "@endo/env-options" "^0.1.4" + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"