diff --git a/packages/core/core/test/Atlaspack.test.js b/packages/core/core/test/Atlaspack.test.js index b28985e48..02b187411 100644 --- a/packages/core/core/test/Atlaspack.test.js +++ b/packages/core/core/test/Atlaspack.test.js @@ -6,7 +6,7 @@ import WorkerFarm from '@atlaspack/workers'; import sinon from 'sinon'; import assert from 'assert'; import path from 'path'; -import Parcel, {createWorkerFarm} from '../src/Atlaspack'; +import Atlaspack, {createWorkerFarm} from '../src/Atlaspack'; describe('Atlaspack', function () { this.timeout(75000); @@ -20,10 +20,10 @@ describe('Atlaspack', function () { it('does not initialize when passed an ending farm', async () => { workerFarm.ending = true; - let parcel = createAtlaspack({workerFarm}); + let atlaspack = createAtlaspack({workerFarm}); // $FlowFixMe - await assert.rejects(() => parcel.run(), { + await assert.rejects(() => atlaspack.run(), { name: 'Error', message: 'Supplied WorkerFarm is ending', }); @@ -31,7 +31,7 @@ describe('Atlaspack', function () { workerFarm.ending = false; }); - describe('parcel.end()', () => { + describe('atlaspack.end()', () => { let endSpy; beforeEach(() => { endSpy = sinon.spy(WorkerFarm.prototype, 'end'); @@ -42,31 +42,31 @@ describe('Atlaspack', function () { }); it('ends any WorkerFarm it creates', async () => { - let parcel = createAtlaspack(); - await parcel.run(); + let atlaspack = createAtlaspack(); + await atlaspack.run(); assert.equal(endSpy.callCount, 1); }); it('runs and constructs another farm for subsequent builds', async () => { - let parcel = createAtlaspack(); + let atlaspack = createAtlaspack(); - await parcel.run(); - await parcel.run(); + await atlaspack.run(); + await atlaspack.run(); assert.equal(endSpy.callCount, 2); }); it('does not end passed WorkerFarms', async () => { - let parcel = createAtlaspack({workerFarm}); - await parcel.run(); + let atlaspack = createAtlaspack({workerFarm}); + await atlaspack.run(); assert.equal(endSpy.callCount, 0); await workerFarm.end(); }); it('removes shared references it creates', async () => { - let parcel = createAtlaspack({workerFarm}); - await parcel.run(); + let atlaspack = createAtlaspack({workerFarm}); + await atlaspack.run(); assert.equal(workerFarm.sharedReferences.size, 0); assert.equal(workerFarm.sharedReferencesByValue.size, 0); @@ -85,10 +85,10 @@ describe('AtlaspackAPI', function () { afterEach(() => workerFarm.end()); - describe('parcel.unstable_transform()', () => { + describe('atlaspack.unstable_transform()', () => { it('should transform simple file', async () => { - let parcel = createAtlaspack({workerFarm}); - let res = await parcel.unstable_transform({ + let atlaspack = createAtlaspack({workerFarm}); + let res = await atlaspack.unstable_transform({ filePath: path.join(__dirname, 'fixtures/atlaspack/index.js'), }); let code = await res[0].getCode(); @@ -96,8 +96,8 @@ describe('AtlaspackAPI', function () { }); it('should transform with standalone mode', async () => { - let parcel = createAtlaspack({workerFarm}); - let res = await parcel.unstable_transform({ + let atlaspack = createAtlaspack({workerFarm}); + let res = await atlaspack.unstable_transform({ filePath: path.join(__dirname, 'fixtures/atlaspack/other.js'), query: 'standalone=true', }); @@ -109,10 +109,10 @@ describe('AtlaspackAPI', function () { }); }); - describe('parcel.resolve()', () => { + describe('atlaspack.resolve()', () => { it('should resolve dependencies', async () => { - let parcel = createAtlaspack({workerFarm}); - let res = await parcel.unstable_resolve({ + let atlaspack = createAtlaspack({workerFarm}); + let res = await atlaspack.unstable_resolve({ specifier: './other', specifierType: 'esm', resolveFrom: path.join(__dirname, 'fixtures/atlaspack/index.js'), @@ -129,7 +129,7 @@ describe('AtlaspackAPI', function () { }); function createAtlaspack(opts?: InitialAtlaspackOptions) { - return new Parcel({ + return new Atlaspack({ entries: [path.join(__dirname, 'fixtures/atlaspack/index.js')], logLevel: 'info', defaultConfig: path.join( diff --git a/packages/core/fs/src/NodeFS.js b/packages/core/fs/src/NodeFS.js index a3e16a8f8..5c39e72c1 100644 --- a/packages/core/fs/src/NodeFS.js +++ b/packages/core/fs/src/NodeFS.js @@ -37,7 +37,7 @@ const realpath = promisify( const isPnP = process.versions.pnp != null; function getWatchmanWatcher(): typeof watcher { - // This is here to trick parcel into ignoring this require... + // This is here to trick atlaspack into ignoring this require... const packageName = ['@atlaspack', 'watcher-watchman-js'].join('/'); // $FlowFixMe diff --git a/packages/core/fs/src/OverlayFS.js b/packages/core/fs/src/OverlayFS.js index 545ec1e8c..b340aa194 100644 --- a/packages/core/fs/src/OverlayFS.js +++ b/packages/core/fs/src/OverlayFS.js @@ -92,7 +92,7 @@ export class OverlayFS implements FileSystem { ) { return true; } else { - // HACK: Parcel fs does not provide `lstatSync`, + // HACK: Atlaspack fs does not provide `lstatSync`, // so we use `readdirSync` to check if the path is a symlink. let parent = path.resolve(filePath, '..'); if (parent === filePath) { diff --git a/packages/core/integration-tests/test/atlaspack-register.js b/packages/core/integration-tests/test/atlaspack-register.js index c1c321410..abb7b06e0 100644 --- a/packages/core/integration-tests/test/atlaspack-register.js +++ b/packages/core/integration-tests/test/atlaspack-register.js @@ -33,7 +33,7 @@ describe.skip('@atlaspack/register', () => { ); }); - it("enables Parcel's resolver in node", () => { + it("enables Atlaspacks's resolver in node", () => { let [foo, resolved] = execSync( `node -r @atlaspack/register ${path.join( __dirname, diff --git a/packages/core/integration-tests/test/atlaspack-v3.js b/packages/core/integration-tests/test/atlaspack-v3.js index 23a36bdb4..ed9eb0158 100644 --- a/packages/core/integration-tests/test/atlaspack-v3.js +++ b/packages/core/integration-tests/test/atlaspack-v3.js @@ -29,7 +29,7 @@ describe('AtlaspackV3', function () { yarn.lock: {} `; - let parcel = new AtlaspackV3({ + let atlaspack = new AtlaspackV3({ corePath: '', entries: [join(__dirname, 'index.js')], fs: toFileSystemV3(overlayFS), @@ -37,6 +37,6 @@ describe('AtlaspackV3', function () { packageManager: new NodePackageManager(inputFS, __dirname), }); - await parcel.build(); + await atlaspack.build(); }); }); diff --git a/packages/core/integration-tests/test/babel.js b/packages/core/integration-tests/test/babel.js index 382ba215f..96415877e 100644 --- a/packages/core/integration-tests/test/babel.js +++ b/packages/core/integration-tests/test/babel.js @@ -21,7 +21,7 @@ import {spawnSync} from 'child_process'; import tempy from 'tempy'; import {md} from '@atlaspack/diagnostic'; -const parcelCli = require.resolve('@atlaspack/cli/src/bin.js'); +const atlaspackCli = require.resolve('@atlaspack/cli/src/bin.js'); const inputDir = path.join(__dirname, '/input'); describe.v2('babel', function () { @@ -244,7 +244,7 @@ describe.v2('babel', function () { await outputFS.rimraf(path.join(fixtureDir, 'dist')); }); - it('should support building with custom babel config when running parcel globally', async function () { + it('should support building with custom babel config when running atlaspack globally', async function () { let tmpDir = tempy.directory(); let distDir = path.join(tmpDir, 'dist'); await fs.ncp( @@ -349,7 +349,7 @@ describe.v2('babel', function () { assert(file.includes('class Foo')); }); - it('should be "production" if Parcel is run in production mode', async () => { + it('should be "production" if Atlaspack is run in production mode', async () => { await bundle( path.join(__dirname, '/integration/babel-env-name/index.js'), { @@ -470,7 +470,7 @@ describe.v2('babel', function () { spawnSync( 'node', [ - parcelCli, + atlaspackCli, 'build', 'src/index.js', '--no-optimize', @@ -512,7 +512,13 @@ describe.v2('babel', function () { let build = () => spawnSync( 'node', - [parcelCli, 'build', 'index.js', '--no-optimize', '--no-scope-hoist'], + [ + atlaspackCli, + 'build', + 'index.js', + '--no-optimize', + '--no-scope-hoist', + ], { cwd: inputDir, env: { diff --git a/packages/core/integration-tests/test/integration/cache/package.json b/packages/core/integration-tests/test/integration/cache/package.json index b89e653ab..34db0f476 100644 --- a/packages/core/integration-tests/test/integration/cache/package.json +++ b/packages/core/integration-tests/test/integration/cache/package.json @@ -1,5 +1,5 @@ { - "name": "parcel-cache-tests", + "name": "atlaspack-cache-tests", "version": "1.0.0", "private": true } diff --git a/packages/core/integration-tests/test/integration/css-module-css-siblings/main.js b/packages/core/integration-tests/test/integration/css-module-css-siblings/main.js index 3039e0f52..3779c7ba5 100644 --- a/packages/core/integration-tests/test/integration/css-module-css-siblings/main.js +++ b/packages/core/integration-tests/test/integration/css-module-css-siblings/main.js @@ -1,4 +1,4 @@ -// Adopted from https://github.com/nartallax/atlaspack-css-bug +// Adopted from https://github.com/nartallax/parcel-css-bug // To address https://github.com/parcel-bundler/parcel/issues/8716 import * as aCss from "./a.module.css" import * as bCss from "./b.module.css" diff --git a/packages/core/integration-tests/test/integration/encodedURI/index.html b/packages/core/integration-tests/test/integration/encodedURI/index.html index 1b9cbca09..00e48afe6 100644 --- a/packages/core/integration-tests/test/integration/encodedURI/index.html +++ b/packages/core/integration-tests/test/integration/encodedURI/index.html @@ -2,10 +2,10 @@
-