diff --git a/packages/core/core/src/RequestTracker.js b/packages/core/core/src/RequestTracker.js index 5c9cb7169..32309f861 100644 --- a/packages/core/core/src/RequestTracker.js +++ b/packages/core/core/src/RequestTracker.js @@ -1510,7 +1510,7 @@ export default class RequestTracker { let opts = getWatcherOptions(this.options); let snapshotPath = path.join(this.options.cacheDir, snapshotKey + '.txt'); - await this.options.inputFS.writeSnapshot( + await this.options.outputFS.writeSnapshot( this.options.watchDir, snapshotPath, opts, diff --git a/packages/core/core/test/TargetRequest.test.js b/packages/core/core/test/TargetRequest.test.js index b74d4ad19..2a86d7780 100644 --- a/packages/core/core/test/TargetRequest.test.js +++ b/packages/core/core/test/TargetRequest.test.js @@ -1243,7 +1243,7 @@ describe('TargetResolver', () => { [ { name: 'default', - distDir: '.atlaspack-cache/dist', + distDir: serveDistDir, publicUrl: '/', env: { id: 'd6ea1d42532a7575', diff --git a/packages/core/core/test/test-utils.js b/packages/core/core/test/test-utils.js index a9e42973e..786a16a34 100644 --- a/packages/core/core/test/test-utils.js +++ b/packages/core/core/test/test-utils.js @@ -5,7 +5,6 @@ import type {Environment, AtlaspackOptions, Target} from '../src/types'; import {DEFAULT_FEATURE_FLAGS} from '@atlaspack/feature-flags'; import {FSCache} from '@atlaspack/cache'; import tempy from 'tempy'; -import path from 'path'; import {inputFS, outputFS} from '@atlaspack/test-utils'; import {relativePath} from '@atlaspack/utils'; import {NodePackageManager} from '@atlaspack/package-manager'; @@ -17,7 +16,7 @@ export let cache: FSCache = new FSCache(outputFS, cacheDir); cache.ensure(); export const DEFAULT_OPTIONS: AtlaspackOptions = { - cacheDir: path.join(__dirname, '.atlaspack-cache'), + cacheDir, atlaspackVersion: '', watchDir: __dirname, watchIgnore: undefined, diff --git a/packages/core/integration-tests/test/atlaspack-query.js b/packages/core/integration-tests/test/atlaspack-query.js index 8e0bcb1f2..d421f522b 100644 --- a/packages/core/integration-tests/test/atlaspack-query.js +++ b/packages/core/integration-tests/test/atlaspack-query.js @@ -1,11 +1,17 @@ // @flow import assert from 'assert'; import path from 'path'; -import {bundle, describe, fsFixture, overlayFS} from '@atlaspack/test-utils'; +import { + bundle, + describe, + fsFixture, + overlayFS, + inputFS, +} from '@atlaspack/test-utils'; import {loadGraphs} from '../../../dev/query/src'; describe.v2('atlaspack-query', () => { - it.skip('loadGraphs', async function () { + it('loadGraphs', async function () { let entries = 'index.js'; let options = { mode: 'production', @@ -14,6 +20,9 @@ describe.v2('atlaspack-query', () => { }, shouldDisableCache: false, inputFS: overlayFS, + // We need to write to the default inputFS (NodeFS) as `loadGraphs` doesn't + // support custom FS's + outputFS: inputFS, cacheDir: path.join(__dirname, '.atlaspack-cache'), }; diff --git a/packages/core/integration-tests/test/cache.js b/packages/core/integration-tests/test/cache.js index 54ff59202..deb100331 100644 --- a/packages/core/integration-tests/test/cache.js +++ b/packages/core/integration-tests/test/cache.js @@ -3532,7 +3532,7 @@ describe.v2('cache', function () { assert(!res.includes('BAR')); }); - describe('pnp', function () { + describe.skip('pnp', function () { it('should invalidate when the .pnp.js file changes', async function () { let Module = require('module'); let origPnpVersion = process.versions.pnp;