From 406fc6194103ea211ce1ab6d3b3a1b9370033369 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 16 Sep 2024 20:50:52 +0200 Subject: [PATCH] rename @org to @push-based --- README.md | 2 +- docs/motivation.md | 14 +++++++------- e2e/cli-e2e/test/cli-command-sort.spec.ts | 6 +++--- e2e/cli-static-e2e/test/cli-command-sort.spec.ts | 6 +++--- e2e/core-e2e/test/utils-sort-user-file.spec.ts | 8 ++++---- e2e/models-e2e/test/models-parse.spec.ts | 6 +++--- e2e/playground-e2e/test/cli-command-sort.spec.ts | 4 ++-- .../test/core-sort-user-file.spec.ts | 8 ++++---- e2e/playground-e2e/test/models-parse.spec.ts | 6 +++--- .../test/utils-sort-user-list.spec.ts | 6 +++--- e2e/utils-e2e/test/utils-sort-user-list.spec.ts | 6 +++--- nx.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- projects/build-env/README.md | 14 +++++++------- projects/build-env/package.json | 2 +- .../build-env/src/executors/bootstrap/executor.ts | 2 +- .../src/executors/bootstrap/executor.unit-test.ts | 4 ++-- .../src/executors/bootstrap/npm.unit-test.ts | 2 +- .../src/executors/kill-process/executor.ts | 2 +- .../executors/kill-process/executor.unit-test.ts | 6 +++--- .../executors/npm-install/executor.unit-test.ts | 2 +- .../executors/npm-publish/executor.unit-test.ts | 2 +- .../src/internal/execute-process.unit-test.ts | 2 +- .../src/internal/file-system.unit-test.ts | 2 +- projects/build-env/src/plugin/plugin.ts | 10 +++++----- projects/cli/package.json | 2 +- projects/cli/src/lib/cli.spec.ts | 6 +++--- projects/cli/src/lib/cli.ts | 2 +- projects/core/package.json | 2 +- projects/core/src/lib/core.ts | 4 ++-- projects/models/package.json | 2 +- projects/utils/package.json | 2 +- projects/utils/src/lib/utils.ts | 2 +- testing/test-setup/src/lib/fs.mock.ts | 2 +- tsconfig.base.json | 14 +++++++------- 36 files changed, 84 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index be3e7478..c7ec6002 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This plugin provides a zeros configuration setup to run e2e tests in a package m { "plugins": [ { - "plugin": "@org/build-env", + "plugin": "@push-based/build-env", "options": { "environmentsDir": "tmp/environments" // Optional } diff --git a/docs/motivation.md b/docs/motivation.md index dea15494..4c638c16 100644 --- a/docs/motivation.md +++ b/docs/motivation.md @@ -33,8 +33,8 @@ The following is a simplified version of a global setup script used by your test ```ts // global-setup.ts import { rm } from 'node:fs/promises'; -import { executeProcess, objectToCliArgs } from '@org/test-utils'; -import { configureRegistry, RegistryResult, startVerdaccioServer, unconfigureRegistry } from '@org/tools-utils'; +import { executeProcess, objectToCliArgs } from '@push-based/test-utils'; +import { configureRegistry, RegistryResult, startVerdaccioServer, unconfigureRegistry } from '@push-based/tools-utils'; export async function setup() { const { verdaccioPort } = await startVerdaccioServer({ @@ -117,15 +117,15 @@ You are forced to run the tests in sequence. **Publish conflict:** -1. Test A: `npm publish @org/pkg@0.0.1 --registry=http://localhost:4873` # ✅ -2. Test B: `npm publish @org/pkg@0.0.1 --registry=http://localhost:4873` # ❌ package already exists in registry +1. Test A: `npm publish @push-based/pkg@0.0.1 --registry=http://localhost:4873` # ✅ +2. Test B: `npm publish @push-based/pkg@0.0.1 --registry=http://localhost:4873` # ❌ package already exists in registry **Install/uninstall conflict:** -1. Test A: `npm install @org/pkg@0.0.1 --registry=http://localhost:4873` # ✅ -2. Test B: `npm install @org/pkg@0.0.1 --registry=http://localhost:4873` # ✅ +1. Test A: `npm install @push-based/pkg@0.0.1 --registry=http://localhost:4873` # ✅ +2. Test B: `npm install @push-based/pkg@0.0.1 --registry=http://localhost:4873` # ✅ 3. Test B: `nx e2e pkg` # ✅ -4. Test B: `npm uninstall @org/pkg@0.0.1 --registry=http://localhost:4873` # ✅ +4. Test B: `npm uninstall @push-based/pkg@0.0.1 --registry=http://localhost:4873` # ✅ 5. Test A: `nx e2e pkg` # ❌ package not installed ### 📉 Scalability diff --git a/e2e/cli-e2e/test/cli-command-sort.spec.ts b/e2e/cli-e2e/test/cli-command-sort.spec.ts index e585a2f1..f0344598 100644 --- a/e2e/cli-e2e/test/cli-command-sort.spec.ts +++ b/e2e/cli-e2e/test/cli-command-sort.spec.ts @@ -1,9 +1,9 @@ import { dirname, join, basename } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; import { mkdir, readFile, rm, writeFile } from 'node:fs/promises'; -import { executeProcess, objectToCliArgs } from '@org/test-utils'; -import { getEnvironmentRoot } from '@org/build-env'; -import { getTestFixturesDist } from '@org/test-utils'; +import { executeProcess, objectToCliArgs } from '@push-based/test-utils'; +import { getEnvironmentRoot } from '@push-based/build-env'; +import { getTestFixturesDist } from '@push-based/test-utils'; describe('CLI command - sort', () => { const fixturesDist = getTestFixturesDist('cli-command-sort', { diff --git a/e2e/cli-static-e2e/test/cli-command-sort.spec.ts b/e2e/cli-static-e2e/test/cli-command-sort.spec.ts index e585a2f1..f0344598 100644 --- a/e2e/cli-static-e2e/test/cli-command-sort.spec.ts +++ b/e2e/cli-static-e2e/test/cli-command-sort.spec.ts @@ -1,9 +1,9 @@ import { dirname, join, basename } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; import { mkdir, readFile, rm, writeFile } from 'node:fs/promises'; -import { executeProcess, objectToCliArgs } from '@org/test-utils'; -import { getEnvironmentRoot } from '@org/build-env'; -import { getTestFixturesDist } from '@org/test-utils'; +import { executeProcess, objectToCliArgs } from '@push-based/test-utils'; +import { getEnvironmentRoot } from '@push-based/build-env'; +import { getTestFixturesDist } from '@push-based/test-utils'; describe('CLI command - sort', () => { const fixturesDist = getTestFixturesDist('cli-command-sort', { diff --git a/e2e/core-e2e/test/utils-sort-user-file.spec.ts b/e2e/core-e2e/test/utils-sort-user-file.spec.ts index 2a713482..723a168b 100644 --- a/e2e/core-e2e/test/utils-sort-user-file.spec.ts +++ b/e2e/core-e2e/test/utils-sort-user-file.spec.ts @@ -1,10 +1,10 @@ import { basename, join } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; import { mkdir, rm, writeFile } from 'node:fs/promises'; -import { executeProcess, getTestFixturesDist } from '@org/test-utils'; +import { executeProcess, getTestFixturesDist } from '@push-based/test-utils'; import { readJsonFile } from 'nx/src/utils/fileutils'; -import { User } from '@org/models'; -import { getEnvironmentRoot } from '@org/build-env'; +import { User } from '@push-based/models'; +import { getEnvironmentRoot } from '@push-based/build-env'; describe('core - sort user.json', () => { const fixturesDist = getTestFixturesDist('sort-user-json', { @@ -29,7 +29,7 @@ describe('core - sort user.json', () => { writeFile( testScriptPath, ` - import {sortUserFile} from "@org/core"; + import {sortUserFile} from "@push-based/core"; sortUserFile('${basename(testDataPath)}');` ) ).resolves.not.toThrow(); diff --git a/e2e/models-e2e/test/models-parse.spec.ts b/e2e/models-e2e/test/models-parse.spec.ts index 6ef20353..a2f0bc39 100644 --- a/e2e/models-e2e/test/models-parse.spec.ts +++ b/e2e/models-e2e/test/models-parse.spec.ts @@ -1,8 +1,8 @@ import { basename, dirname, join } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; import { mkdir, writeFile, rm } from 'node:fs/promises'; -import { executeProcess, getTestFixturesDist } from '@org/test-utils'; -import { getEnvironmentRoot } from '@org/build-env'; +import { executeProcess, getTestFixturesDist } from '@push-based/test-utils'; +import { getEnvironmentRoot } from '@push-based/build-env'; describe('models - parse user', () => { const fixturesDist = getTestFixturesDist('parse-user', { @@ -20,7 +20,7 @@ describe('models - parse user', () => { writeFile( testPath, ` - import {parseUser} from "@org/models"; + import {parseUser} from "@push-based/models"; console.log(JSON.stringify(parseUser({name: 'Alice', color: 'green'}), null, 2));` ) ).resolves.not.toThrow(); diff --git a/e2e/playground-e2e/test/cli-command-sort.spec.ts b/e2e/playground-e2e/test/cli-command-sort.spec.ts index 211c6e27..d82a1321 100644 --- a/e2e/playground-e2e/test/cli-command-sort.spec.ts +++ b/e2e/playground-e2e/test/cli-command-sort.spec.ts @@ -5,8 +5,8 @@ import { executeProcess, objectToCliArgs, getTestFixturesDist, -} from '@org/test-utils'; -import { getEnvironmentRoot } from '@org/build-env'; +} from '@push-based/test-utils'; +import { getEnvironmentRoot } from '@push-based/build-env'; describe('CLI command - sort', () => { const fixturesDist = getTestFixturesDist('cli-command-sort', { diff --git a/e2e/playground-e2e/test/core-sort-user-file.spec.ts b/e2e/playground-e2e/test/core-sort-user-file.spec.ts index 2a713482..723a168b 100644 --- a/e2e/playground-e2e/test/core-sort-user-file.spec.ts +++ b/e2e/playground-e2e/test/core-sort-user-file.spec.ts @@ -1,10 +1,10 @@ import { basename, join } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; import { mkdir, rm, writeFile } from 'node:fs/promises'; -import { executeProcess, getTestFixturesDist } from '@org/test-utils'; +import { executeProcess, getTestFixturesDist } from '@push-based/test-utils'; import { readJsonFile } from 'nx/src/utils/fileutils'; -import { User } from '@org/models'; -import { getEnvironmentRoot } from '@org/build-env'; +import { User } from '@push-based/models'; +import { getEnvironmentRoot } from '@push-based/build-env'; describe('core - sort user.json', () => { const fixturesDist = getTestFixturesDist('sort-user-json', { @@ -29,7 +29,7 @@ describe('core - sort user.json', () => { writeFile( testScriptPath, ` - import {sortUserFile} from "@org/core"; + import {sortUserFile} from "@push-based/core"; sortUserFile('${basename(testDataPath)}');` ) ).resolves.not.toThrow(); diff --git a/e2e/playground-e2e/test/models-parse.spec.ts b/e2e/playground-e2e/test/models-parse.spec.ts index 6ef20353..a2f0bc39 100644 --- a/e2e/playground-e2e/test/models-parse.spec.ts +++ b/e2e/playground-e2e/test/models-parse.spec.ts @@ -1,8 +1,8 @@ import { basename, dirname, join } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; import { mkdir, writeFile, rm } from 'node:fs/promises'; -import { executeProcess, getTestFixturesDist } from '@org/test-utils'; -import { getEnvironmentRoot } from '@org/build-env'; +import { executeProcess, getTestFixturesDist } from '@push-based/test-utils'; +import { getEnvironmentRoot } from '@push-based/build-env'; describe('models - parse user', () => { const fixturesDist = getTestFixturesDist('parse-user', { @@ -20,7 +20,7 @@ describe('models - parse user', () => { writeFile( testPath, ` - import {parseUser} from "@org/models"; + import {parseUser} from "@push-based/models"; console.log(JSON.stringify(parseUser({name: 'Alice', color: 'green'}), null, 2));` ) ).resolves.not.toThrow(); diff --git a/e2e/playground-e2e/test/utils-sort-user-list.spec.ts b/e2e/playground-e2e/test/utils-sort-user-list.spec.ts index fd256881..4326f400 100644 --- a/e2e/playground-e2e/test/utils-sort-user-list.spec.ts +++ b/e2e/playground-e2e/test/utils-sort-user-list.spec.ts @@ -1,8 +1,8 @@ import { basename, dirname, join } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; import { mkdir, writeFile, rm } from 'node:fs/promises'; -import { executeProcess, getTestFixturesDist } from '@org/test-utils'; -import { getEnvironmentRoot } from '@org/build-env'; +import { executeProcess, getTestFixturesDist } from '@push-based/test-utils'; +import { getEnvironmentRoot } from '@push-based/build-env'; describe('utils - sort user list', () => { const fixturesDist = getTestFixturesDist('sort-user-list', { @@ -20,7 +20,7 @@ describe('utils - sort user list', () => { writeFile( testPath, ` - import {sortUser} from "@org/utils"; + import {sortUser} from "@push-based/utils"; console.log(JSON.stringify(sortUser([{name: 'Michael'}, {name: 'Alice'}]), null, 2));` ) ).resolves.not.toThrow(); diff --git a/e2e/utils-e2e/test/utils-sort-user-list.spec.ts b/e2e/utils-e2e/test/utils-sort-user-list.spec.ts index 2ea2dcfd..a6ee0e89 100644 --- a/e2e/utils-e2e/test/utils-sort-user-list.spec.ts +++ b/e2e/utils-e2e/test/utils-sort-user-list.spec.ts @@ -1,8 +1,8 @@ import { basename, dirname, join } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; import { mkdir, rm, writeFile } from 'node:fs/promises'; -import { executeProcess, getTestFixturesDist } from '@org/test-utils'; -import { getEnvironmentRoot } from '@org/build-env'; +import { executeProcess, getTestFixturesDist } from '@push-based/test-utils'; +import { getEnvironmentRoot } from '@push-based/build-env'; describe('utils - sort user list', () => { const fixturesDist = getTestFixturesDist('sort-user-list', { @@ -19,7 +19,7 @@ describe('utils - sort user list', () => { writeFile( testPath, ` - import {sortUser} from "@org/utils"; + import {sortUser} from "@push-based/utils"; console.log(JSON.stringify(sortUser([{name: 'Michael'}, {name: 'Alice'}]), null, 2));` ) ).resolves.not.toThrow(); diff --git a/nx.json b/nx.json index 89e1c2bd..cfaa8578 100644 --- a/nx.json +++ b/nx.json @@ -82,7 +82,7 @@ }, "plugins": [ "./e2e-examples/cli-e2e-original/tooling/original.plugin.ts", - "@org/build-env", + "@push-based/build-env", { "plugin": "@nx/eslint/plugin", "options": { diff --git a/package-lock.json b/package-lock.json index 7f724359..19aae469 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@org/source", + "name": "@push-based/source", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@org/source", + "name": "@push-based/source", "version": "0.0.0", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 8aea2fe8..35b09bee 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@org/source", + "name": "@push-based/source", "version": "0.0.0", "license": "MIT", "scripts": {}, diff --git a/projects/build-env/README.md b/projects/build-env/README.md index ed6ee3ea..38c68289 100644 --- a/projects/build-env/README.md +++ b/projects/build-env/README.md @@ -1,4 +1,4 @@ -# @org/build-env +# @push-based/build-env ## To Research @@ -16,14 +16,14 @@ - build output, using dependent task output? careful though, [it is known to struggle with Nx cloud agents](https://github.com/nrwl/nx/issues/22745) - outputs - list of packages in registry under `.../storage/.verdaccio-db.json` e.g.: `{"list":[""],"secret":"esKM34zA53wetObgi5f0Uu1e7iObmm+f"}`` - - tarball of package under `.../storage/@org/-.tgz` - e.g.: `{workspaceRoot}/${environmentsDir}/{args.environmentProject}/storage/@org/${packageName}`, - - `package.json` of package under `.../storage/@org//package.json` + - tarball of package under `.../storage/@push-based/-.tgz` + e.g.: `{workspaceRoot}/${environmentsDir}/{args.environmentProject}/storage/@push-based/${packageName}`, + - `package.json` of package under `.../storage/@push-based//package.json` - `npm-install` - outputs - list of installed packages under `.../package.json` - list of installed packages under `.../package-lock.json` - - source of package under `.../node_modules/@org//*` + - source of package under `.../node_modules/@push-based//*` mehh, we know the node_modules reputation - inputs: - output of npm-publish(?), package.json @@ -49,5 +49,5 @@ See [configuration docs](./src/generators/configuration/README.md) for details Examples: -- `nx g @org/build-env:configuration --project=` -- `nx g @org/build-env:configuration --project= --targetName=cp` +- `nx g @push-based/build-env:configuration --project=` +- `nx g @push-based/build-env:configuration --project= --targetName=cp` diff --git a/projects/build-env/package.json b/projects/build-env/package.json index d89dd220..055d3c77 100644 --- a/projects/build-env/package.json +++ b/projects/build-env/package.json @@ -1,5 +1,5 @@ { - "name": "@org/build-env", + "name": "@push-based/build-env", "version": "0.29.0", "license": "MIT", "dependencies": { diff --git a/projects/build-env/src/executors/bootstrap/executor.ts b/projects/build-env/src/executors/bootstrap/executor.ts index 5c57dee1..daeba9e2 100644 --- a/projects/build-env/src/executors/bootstrap/executor.ts +++ b/projects/build-env/src/executors/bootstrap/executor.ts @@ -18,7 +18,7 @@ export default async function runBootstrapExecutor( options ); logger.info( - `Execute @org/build-env:build with options: ${JSON.stringify( + `Execute @push-based/build-env:build with options: ${JSON.stringify( options, null, 2 diff --git a/projects/build-env/src/executors/bootstrap/executor.unit-test.ts b/projects/build-env/src/executors/bootstrap/executor.unit-test.ts index f0dfe702..0a79a6be 100644 --- a/projects/build-env/src/executors/bootstrap/executor.unit-test.ts +++ b/projects/build-env/src/executors/bootstrap/executor.unit-test.ts @@ -61,7 +61,7 @@ describe('runBootstrapExecutor', () => { expect(logger.error).not.toHaveBeenCalled(); expect(logger.info).toHaveBeenCalledTimes(1); expect(logger.info).toHaveBeenCalledWith( - 'Execute @org/build-env:build with options: {}' + 'Execute @push-based/build-env:build with options: {}' ); expect(bootstrapEnvironmentSpy).toHaveBeenCalledTimes(1); @@ -135,7 +135,7 @@ describe('runBootstrapExecutor', () => { expect(logger.info).toHaveBeenCalledTimes(1); expect(logger.info).toHaveBeenCalledWith( - 'Execute @org/build-env:build with options: {}' + 'Execute @push-based/build-env:build with options: {}' ); expect(logger.error).toHaveBeenCalledTimes(1); diff --git a/projects/build-env/src/executors/bootstrap/npm.unit-test.ts b/projects/build-env/src/executors/bootstrap/npm.unit-test.ts index 964cf953..a93022e6 100644 --- a/projects/build-env/src/executors/bootstrap/npm.unit-test.ts +++ b/projects/build-env/src/executors/bootstrap/npm.unit-test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { bold, red } from 'ansis'; -import { MEMFS_VOLUME } from '@org/test-utils'; +import { MEMFS_VOLUME } from '@push-based/test-utils'; import { configureRegistry, type ConfigureRegistryOptions, diff --git a/projects/build-env/src/executors/kill-process/executor.ts b/projects/build-env/src/executors/kill-process/executor.ts index 87dd80b5..47150762 100644 --- a/projects/build-env/src/executors/kill-process/executor.ts +++ b/projects/build-env/src/executors/kill-process/executor.ts @@ -27,7 +27,7 @@ export default async function runKillProcessExecutor( } = opt; logger.info( - `Execute @org/stop-verdaccio-env:kill-process with options: ${JSON.stringify( + `Execute @push-based/stop-verdaccio-env:kill-process with options: ${JSON.stringify( options, null, 2 diff --git a/projects/build-env/src/executors/kill-process/executor.unit-test.ts b/projects/build-env/src/executors/kill-process/executor.unit-test.ts index 4c96e71b..fea3ccf1 100644 --- a/projects/build-env/src/executors/kill-process/executor.unit-test.ts +++ b/projects/build-env/src/executors/kill-process/executor.unit-test.ts @@ -1,7 +1,7 @@ import { beforeEach, describe, expect, vi } from 'vitest'; import runKillProcessExecutor from './executor'; import * as killProcessModule from './kill-process'; -import { MEMFS_VOLUME } from '@org/test-utils'; +import { MEMFS_VOLUME } from '@push-based/test-utils'; import { logger } from '@nx/devkit'; vi.mock('@nx/devkit', async () => { @@ -69,7 +69,7 @@ describe('runKillProcessExecutor', () => { expect(logger.info).toHaveBeenCalledTimes(1); expect(logger.info).toHaveBeenCalledWith( - `Execute @org/stop-verdaccio-env:kill-process with options: ${JSON.stringify( + `Execute @push-based/stop-verdaccio-env:kill-process with options: ${JSON.stringify( { pid: 777 }, null, 2 @@ -122,7 +122,7 @@ describe('runKillProcessExecutor', () => { expect(logger.info).toHaveBeenCalledTimes(1); expect(logger.info).toHaveBeenCalledWith( - `Execute @org/stop-verdaccio-env:kill-process with options: ${JSON.stringify( + `Execute @push-based/stop-verdaccio-env:kill-process with options: ${JSON.stringify( { filePath: 'tmp/environments/my-lib' }, null, 2 diff --git a/projects/build-env/src/executors/npm-install/executor.unit-test.ts b/projects/build-env/src/executors/npm-install/executor.unit-test.ts index 223d02fb..362f4f7d 100644 --- a/projects/build-env/src/executors/npm-install/executor.unit-test.ts +++ b/projects/build-env/src/executors/npm-install/executor.unit-test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect } from 'vitest'; import runNpmInstallExecutor from './executor'; -import { MEMFS_VOLUME } from '@org/test-utils'; +import { MEMFS_VOLUME } from '@push-based/test-utils'; import * as execProcessModule from '../../internal/execute-process'; import { logger, readJsonFile } from '@nx/devkit'; import { join } from 'node:path'; diff --git a/projects/build-env/src/executors/npm-publish/executor.unit-test.ts b/projects/build-env/src/executors/npm-publish/executor.unit-test.ts index 965bab74..6afd7625 100644 --- a/projects/build-env/src/executors/npm-publish/executor.unit-test.ts +++ b/projects/build-env/src/executors/npm-publish/executor.unit-test.ts @@ -1,6 +1,6 @@ import {beforeEach, describe, expect} from 'vitest'; import runNpmPublishExecutor from './executor'; -import {MEMFS_VOLUME} from '@org/test-utils'; +import {MEMFS_VOLUME} from '@push-based/test-utils'; import * as execProcessModule from '../../internal/execute-process'; import {logger} from '@nx/devkit'; diff --git a/projects/build-env/src/internal/execute-process.unit-test.ts b/projects/build-env/src/internal/execute-process.unit-test.ts index 2d5cd37e..8e3e72bb 100644 --- a/projects/build-env/src/internal/execute-process.unit-test.ts +++ b/projects/build-env/src/internal/execute-process.unit-test.ts @@ -1,6 +1,6 @@ import { ChildProcess } from 'node:child_process'; import { describe, expect, it, vi, beforeEach } from 'vitest'; -import { getAsyncProcessRunnerConfig } from '@org/test-utils'; +import { getAsyncProcessRunnerConfig } from '@push-based/test-utils'; import { type ProcessObserver, executeProcess } from './execute-process'; describe('executeProcess', () => { diff --git a/projects/build-env/src/internal/file-system.unit-test.ts b/projects/build-env/src/internal/file-system.unit-test.ts index 11c4f022..17b1f021 100644 --- a/projects/build-env/src/internal/file-system.unit-test.ts +++ b/projects/build-env/src/internal/file-system.unit-test.ts @@ -1,6 +1,6 @@ import { join } from 'node:path'; import { stat } from 'node:fs/promises'; -import { MEMFS_VOLUME } from '@org/test-utils'; +import { MEMFS_VOLUME } from '@push-based/test-utils'; import { vol } from 'memfs'; import { ensureDirectoryExists } from './file-system'; diff --git a/projects/build-env/src/plugin/plugin.ts b/projects/build-env/src/plugin/plugin.ts index 2bcbb24b..32835216 100644 --- a/projects/build-env/src/plugin/plugin.ts +++ b/projects/build-env/src/plugin/plugin.ts @@ -77,7 +77,7 @@ function verdaccioTargets({ }, }, 'stop-verdaccio': { - executor: '@org/build-env:kill-process', + executor: '@push-based/build-env:kill-process', options: { filePath: join(environmentRoot, VERDACCIO_REGISTRY_JSON), ...options, @@ -94,7 +94,7 @@ function envTargets({ }): Record { return { 'bootstrap-env': { - executor: '@org/build-env:bootstrap', + executor: '@push-based/build-env:bootstrap', }, // just here to execute dependent npm-install tasks with the correct environmentProject 'install-env': { @@ -111,7 +111,7 @@ function envTargets({ // runs bootstrap-env, install-env and stop-verdaccio 'setup-env': { outputs: ['{options.environmentRoot}'], - executor: '@org/build-env:setup', + executor: '@push-based/build-env:setup', options: { environmentRoot }, }, }; @@ -126,7 +126,7 @@ function npmTargets( { projects: 'self', target: 'build', params: 'forward' }, { projects: 'dependencies', target: 'npm-publish', params: 'forward' }, ], - executor: '@org/build-env:npm-publish', + executor: '@push-based/build-env:npm-publish', options: { environmentProject }, }, 'npm-install': { @@ -134,7 +134,7 @@ function npmTargets( { projects: 'self', target: 'npm-publish', params: 'forward' }, { projects: 'dependencies', target: 'npm-install', params: 'forward' }, ], - executor: '@org/build-env:npm-install', + executor: '@push-based/build-env:npm-install', options: { environmentProject }, }, }; diff --git a/projects/cli/package.json b/projects/cli/package.json index 7e7a81ca..49dd7757 100644 --- a/projects/cli/package.json +++ b/projects/cli/package.json @@ -1,5 +1,5 @@ { - "name": "@org/cli", + "name": "@push-based/cli", "version": "0.0.1", "dependencies": { "yargs": "^17.7.2" diff --git a/projects/cli/src/lib/cli.spec.ts b/projects/cli/src/lib/cli.spec.ts index 25d79617..6202517d 100644 --- a/projects/cli/src/lib/cli.spec.ts +++ b/projects/cli/src/lib/cli.spec.ts @@ -1,10 +1,10 @@ import { join } from 'node:path'; -import { sortUserFile } from '@org/core'; +import { sortUserFile } from '@push-based/core'; import { sortCommandHandle } from './cli'; import { vi } from 'vitest'; -vi.mock('@org/core', async () => { - const actual = await vi.importActual('@org/core'); +vi.mock('@push-based/core', async () => { + const actual = await vi.importActual('@push-based/core'); return { ...actual, sortUserFile: vi.fn(async () => void 0), diff --git a/projects/cli/src/lib/cli.ts b/projects/cli/src/lib/cli.ts index 8d65090b..8c931945 100644 --- a/projects/cli/src/lib/cli.ts +++ b/projects/cli/src/lib/cli.ts @@ -1,5 +1,5 @@ import yargs, {Argv, Options} from 'yargs'; -import { sortUserFile } from '@org/core'; +import { sortUserFile } from '@push-based/core'; export type CliArgs = { filePath: string; diff --git a/projects/core/package.json b/projects/core/package.json index d44e8455..ba5f4082 100644 --- a/projects/core/package.json +++ b/projects/core/package.json @@ -1,5 +1,5 @@ { - "name": "@org/core", + "name": "@push-based/core", "version": "0.0.1", "dependencies": {} } diff --git a/projects/core/src/lib/core.ts b/projects/core/src/lib/core.ts index c8722dd5..86fcc066 100644 --- a/projects/core/src/lib/core.ts +++ b/projects/core/src/lib/core.ts @@ -1,6 +1,6 @@ import { readFile, writeFile } from 'node:fs/promises'; -import { sortUser } from '@org/utils'; -import { parseUser, User } from '@org/models'; +import { sortUser } from '@push-based/utils'; +import { parseUser, User } from '@push-based/models'; export async function sortUserFile(filePath: string): Promise { const userJson: string = (await readFile(filePath)).toString(); diff --git a/projects/models/package.json b/projects/models/package.json index 2790a40c..d3a0c500 100644 --- a/projects/models/package.json +++ b/projects/models/package.json @@ -1,5 +1,5 @@ { - "name": "@org/models", + "name": "@push-based/models", "version": "0.0.1", "dependencies": {} } diff --git a/projects/utils/package.json b/projects/utils/package.json index 4f499190..f1d8b272 100644 --- a/projects/utils/package.json +++ b/projects/utils/package.json @@ -1,5 +1,5 @@ { - "name": "@org/utils", + "name": "@push-based/utils", "version": "0.0.1", "dependencies": {} } diff --git a/projects/utils/src/lib/utils.ts b/projects/utils/src/lib/utils.ts index 5ef0e48e..dc8f98a5 100644 --- a/projects/utils/src/lib/utils.ts +++ b/projects/utils/src/lib/utils.ts @@ -1,4 +1,4 @@ -import {User} from "@org/models"; +import {User} from "@push-based/models"; export function sortUser(users: User[]): User[] { return users.sort((a, b) => a.name.localeCompare(b.name)); diff --git a/testing/test-setup/src/lib/fs.mock.ts b/testing/test-setup/src/lib/fs.mock.ts index 5a5f04db..383afbd8 100644 --- a/testing/test-setup/src/lib/fs.mock.ts +++ b/testing/test-setup/src/lib/fs.mock.ts @@ -1,5 +1,5 @@ import { type MockInstance, afterEach, beforeEach, vi } from 'vitest'; -import { MEMFS_VOLUME } from '@org/test-utils'; +import { MEMFS_VOLUME } from '@push-based/test-utils'; vi.mock('fs', async () => { const memfs: typeof import('memfs') = await vi.importActual('memfs'); diff --git a/tsconfig.base.json b/tsconfig.base.json index 59120530..28acb856 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,13 +15,13 @@ "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { - "@org/build-env": ["projects/build-env/src/index.ts"], - "@org/cli": ["projects/cli/src/index.ts"], - "@org/core": ["projects/core/src/index.ts"], - "@org/models": ["projects/models/src/index.ts"], - "@org/test-setup": ["testing/test-setup/src/index.ts"], - "@org/test-utils": ["testing/test-utils/src/index.ts"], - "@org/utils": ["projects/utils/src/index.ts"] + "@push-based/build-env": ["projects/build-env/src/index.ts"], + "@push-based/cli": ["projects/cli/src/index.ts"], + "@push-based/core": ["projects/core/src/index.ts"], + "@push-based/models": ["projects/models/src/index.ts"], + "@push-based/test-setup": ["testing/test-setup/src/index.ts"], + "@push-based/test-utils": ["testing/test-utils/src/index.ts"], + "@push-based/utils": ["projects/utils/src/index.ts"] } }, "exclude": ["node_modules", "tmp"]