Skip to content

Commit f513aa9

Browse files
committed
fix: remove all backward compatibility and update all LaunchQL* references to Pgpm*
- Removed all backward-compatible re-exports from core, types, and env packages - Updated all LaunchQLOptions -> PgpmOptions across entire codebase - Updated all LaunchQLPackage -> PgpmPackage usages - Updated all LaunchQLMigrate -> PgpmMigrate usages - Updated all LaunchQLInit -> PgpmInit usages - Updated all LaunchQLError -> PgpmError usages This is a clean upgrade with no backward compatibility as requested. Co-Authored-By: Dan Lynch <pyramation@gmail.com>
1 parent c17bd16 commit f513aa9

47 files changed

Lines changed: 106 additions & 130 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

graphile/graphile-settings/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PgManyToMany from '@graphile-contrib/pg-many-to-many';
22
import { getEnvOptions } from '@pgpmjs/env';
3-
import { LaunchQLOptions } from '@pgpmjs/types';
3+
import { PgpmOptions } from '@pgpmjs/types';
44
import PgPostgis from 'graphile-postgis';
55
import FulltextFilterPlugin from 'graphile-plugin-fulltext-filter';
66
import { NodePlugin, Plugin } from 'graphile-build';
@@ -19,7 +19,7 @@ import CustomPgTypeMappingsPlugin from 'graphile-pg-type-mappings';
1919
import UploadPostGraphilePlugin, { Uploader } from 'graphile-upload-plugin';
2020

2121
export const getGraphileSettings = (
22-
rawOpts: LaunchQLOptions
22+
rawOpts: PgpmOptions
2323
): PostGraphileOptions => {
2424
const opts = getEnvOptions(rawOpts);
2525

packages/cli/__tests__/extensions.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
jest.setTimeout(60000);
22
process.env.PGPM_SKIP_UPDATE_CHECK = 'true';
33

4-
import { LaunchQLPackage } from '@pgpmjs/core';
4+
import { PgpmPackage } from '@pgpmjs/core';
55
import { sync as glob } from 'glob';
66
import { Inquirerer } from 'inquirerer';
77
import { ParsedArgs } from 'minimist';
@@ -68,7 +68,7 @@ describe('cmds:extension', () => {
6868
});
6969

7070
// Step 2b: Snapshot initial control file and module dependencies
71-
const initialProject = new LaunchQLPackage(modulePath);
71+
const initialProject = new PgpmPackage(modulePath);
7272

7373
expect(initialProject.getModuleControlFile()).toMatchSnapshot('initial - control file');
7474
expect(initialProject.getModuleDependencies('my-module')).toMatchSnapshot('initial - module dependencies');
@@ -97,7 +97,7 @@ describe('cmds:extension', () => {
9797
expect(relativeFiles).toMatchSnapshot('extension-update - files');
9898

9999
// Step 4: Re-init package and validate changes
100-
const updatedProject = new LaunchQLPackage(modulePath);
100+
const updatedProject = new PgpmPackage(modulePath);
101101

102102
expect(updatedProject.getModuleControlFile()).toMatchSnapshot('updated - control file');
103103
expect(updatedProject.getModuleDependencies('my-module')).toMatchSnapshot('updated - module dependencies');

packages/cli/__tests__/init.install.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
jest.setTimeout(60000);
22
process.env.PGPM_SKIP_UPDATE_CHECK = 'true';
33

4-
import { LaunchQLPackage } from '@pgpmjs/core';
4+
import { PgpmPackage } from '@pgpmjs/core';
55
import * as fs from 'fs';
66
import * as glob from 'glob';
77
import * as path from 'path';
@@ -71,7 +71,7 @@ describe('cmds:install - with initialized workspace and module', () => {
7171
expect(relativeFiles).toMatchSnapshot();
7272

7373
// Snapshot control file
74-
const mod = new LaunchQLPackage(moduleDir);
74+
const mod = new PgpmPackage(moduleDir);
7575
const controlFile = mod.getModuleControlFile();
7676
expect(controlFile).toMatchSnapshot();
7777
});
@@ -117,7 +117,7 @@ describe('cmds:install - with initialized workspace and module', () => {
117117
expect(relativeFiles).toMatchSnapshot();
118118

119119
// Snapshot control file after both installs
120-
const mod = new LaunchQLPackage(moduleDir);
120+
const mod = new PgpmPackage(moduleDir);
121121
const controlFile = mod.getModuleControlFile();
122122
expect(controlFile).toMatchSnapshot();
123123
});

packages/cli/__tests__/init.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
jest.setTimeout(60000);
22
process.env.PGPM_SKIP_UPDATE_CHECK = 'true';
33

4-
import { LaunchQLPackage } from '@pgpmjs/core';
4+
import { PgpmPackage } from '@pgpmjs/core';
55
import { existsSync } from 'fs';
66
import { sync as glob } from 'glob';
77
import { Inquirerer } from 'inquirerer';
@@ -105,7 +105,7 @@ describe('cmds:init', () => {
105105
'module-only'
106106
);
107107

108-
const lql = new LaunchQLPackage(moduleDir);
108+
const lql = new PgpmPackage(moduleDir);
109109
expect(lql.getModuleControlFile()).toMatchSnapshot();
110110
});
111111

packages/cli/__tests__/package.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LaunchQLPackage } from '@pgpmjs/core';
1+
import { PgpmPackage } from '@pgpmjs/core';
22
import * as fs from 'fs';
33
import { sync as glob } from 'glob';
44
import { Inquirerer } from 'inquirerer';
@@ -47,7 +47,7 @@ describe('cmds:package', () => {
4747
fs.cpSync(fixtureWorkspace, workspacePath, { recursive: true });
4848

4949
const modulePath = path.join(workspacePath, 'packages', 'secrets');
50-
const initialProject = new LaunchQLPackage(modulePath);
50+
const initialProject = new PgpmPackage(modulePath);
5151

5252
// Snapshot initial state
5353
expect(initialProject.getModuleControlFile()).toMatchSnapshot('initial - control file');

packages/cli/src/commands/explorer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getEnvOptions } from '@pgpmjs/env';
22
import { LaunchQLExplorer as explorer } from '@launchql/explorer';
33
import { Logger } from '@pgpmjs/logger';
4-
import { LaunchQLOptions } from '@pgpmjs/types';
4+
import { PgpmOptions } from '@pgpmjs/types';
55
import { CLIOptions, Inquirerer, Question } from 'inquirerer';
66

77
const log = new Logger('explorer');
@@ -91,7 +91,7 @@ export default async (
9191
simpleInflection
9292
} = await prompter.prompt(argv, questions);
9393

94-
const options: LaunchQLOptions = getEnvOptions({
94+
const options: PgpmOptions = getEnvOptions({
9595
features: {
9696
oppositeBaseNames,
9797
simpleInflection,

packages/cli/src/commands/server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getEnvOptions } from '@pgpmjs/env';
22
import { Logger } from '@pgpmjs/logger';
33
import { LaunchQLServer as server } from '@launchql/server';
4-
import { LaunchQLOptions } from '@pgpmjs/types';
4+
import { PgpmOptions } from '@pgpmjs/types';
55
import { CLIOptions, Inquirerer, OptionValue,Question } from 'inquirerer';
66
import { getPgPool } from 'pg-cache';
77

@@ -187,7 +187,7 @@ export default async (
187187
roleName = selectedRoleName;
188188
}
189189

190-
const options: LaunchQLOptions = getEnvOptions({
190+
const options: PgpmOptions = getEnvOptions({
191191
pg: { database: selectedDb },
192192
features: {
193193
oppositeBaseNames,
@@ -202,7 +202,7 @@ export default async (
202202
port,
203203
...(origin ? { origin } : {})
204204
}
205-
} as LaunchQLOptions);
205+
} as PgpmOptions);
206206

207207
log.success('✅ Selected Configuration:');
208208
for (const [key, value] of Object.entries(options)) {

packages/core/src/export/export-meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LaunchQLOptions } from '@pgpmjs/types';
1+
import { PgpmOptions } from '@pgpmjs/types';
22
import { Parser } from 'csv-to-pg';
33
import { getPgPool } from 'pg-cache';
44

@@ -217,7 +217,7 @@ const config: Record<string, TableConfig> = {
217217
};
218218

219219
interface ExportMetaParams {
220-
opts: LaunchQLOptions,
220+
opts: PgpmOptions,
221221
dbname: string;
222222
database_id: string;
223223
}

packages/core/src/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,3 @@ export {
3030
VerifyResult} from './migrate/types';
3131
export { hashFile, hashString } from './migrate/utils/hash';
3232
export { executeQuery,TransactionContext, TransactionOptions, withTransaction } from './migrate/utils/transaction';
33-
34-
// Backward-compatible re-exports with deprecation warnings
35-
/** @deprecated Use PgpmPackage instead */
36-
export { PgpmPackage as LaunchQLPackage } from './core/class/pgpm';
37-
/** @deprecated Use PgpmMigrate instead */
38-
export { PgpmMigrate as LaunchQLMigrate } from './migrate/client';
39-
/** @deprecated Use PgpmInit instead */
40-
export { PgpmInit as LaunchQLInit } from './init/client';
41-
/** @deprecated Use PgpmMigrateOptions instead */
42-
export { PgpmMigrateOptions as LaunchQLMigrateOptions } from './migrate/client';

packages/core/test-utils/TestFixture.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'fs';
22
import os from 'os';
33
import path from 'path';
44

5-
import { LaunchQLPackage } from '../src';
5+
import { PgpmPackage } from '../src';
66
import { getFixturePath } from './utils';
77

88
const { mkdtempSync, rmSync, cpSync } = fs;
@@ -11,7 +11,7 @@ export class TestFixture {
1111
readonly tempDir: string;
1212
readonly tempFixtureDir: string;
1313
readonly getFixturePath: (...paths: string[]) => string;
14-
readonly getModuleProject: (workspacePath: string[], moduleName: string) => LaunchQLPackage;
14+
readonly getModuleProject: (workspacePath: string[], moduleName: string) => PgpmPackage;
1515

1616
constructor(...fixturePath: string[]) {
1717
const originalFixtureDir = getFixturePath(...fixturePath);
@@ -23,12 +23,12 @@ export class TestFixture {
2323
this.getFixturePath = (...paths: string[]) =>
2424
path.join(this.tempFixtureDir, ...paths);
2525

26-
this.getModuleProject = (workspacePath: string[], moduleName: string): LaunchQLPackage => {
27-
const workspace = new LaunchQLPackage(this.getFixturePath(...workspacePath));
26+
this.getModuleProject = (workspacePath: string[], moduleName: string): PgpmPackage => {
27+
const workspace = new PgpmPackage(this.getFixturePath(...workspacePath));
2828
const moduleMap = workspace.getModuleMap();
2929
const meta = moduleMap[moduleName];
3030
if (!meta) throw new Error(`Module ${moduleName} not found in workspace`);
31-
return new LaunchQLPackage(this.getFixturePath(...workspacePath, meta.path));
31+
return new PgpmPackage(this.getFixturePath(...workspacePath, meta.path));
3232
};
3333
}
3434

0 commit comments

Comments
 (0)