Skip to content

Commit 6b9e910

Browse files
committed
snaps
1 parent eb6ffad commit 6b9e910

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`cmds:install - with initialized workspace and module installs a module
77
"url": "https://github.com/undefined/undefined/issues",
88
},
99
"dependencies": {
10-
"@webql/base32": "1.1.2",
10+
"@webql/base32": "1.2.1",
1111
},
1212
"description": "undefined",
1313
"homepage": "https://github.com/undefined/undefined",
@@ -45,7 +45,6 @@ exports[`cmds:install - with initialized workspace and module installs a module
4545
"../../extensions/@webql/base32/deploy/schemas/base32/procedures/encode.sql",
4646
"../../extensions/@webql/base32/deploy/schemas/base32/schema.sql",
4747
"../../extensions/@webql/base32/jest.config.js",
48-
"../../extensions/@webql/base32/launchql-base32.control",
4948
"../../extensions/@webql/base32/launchql.plan",
5049
"../../extensions/@webql/base32/LICENSE",
5150
"../../extensions/@webql/base32/Makefile",
@@ -54,7 +53,7 @@ exports[`cmds:install - with initialized workspace and module installs a module
5453
"../../extensions/@webql/base32/revert/schemas/base32/procedures/decode.sql",
5554
"../../extensions/@webql/base32/revert/schemas/base32/procedures/encode.sql",
5655
"../../extensions/@webql/base32/revert/schemas/base32/schema.sql",
57-
"../../extensions/@webql/base32/sql/launchql-base32--0.4.5.sql",
56+
"../../extensions/@webql/base32/sql/webql-base32--1.2.1.sql",
5857
"../../extensions/@webql/base32/src/base32.ts",
5958
"../../extensions/@webql/base32/src/index.ts",
6059
"../../extensions/@webql/base32/test/__snapshots__/base32.decode.test.ts.snap",
@@ -66,6 +65,7 @@ exports[`cmds:install - with initialized workspace and module installs a module
6665
"../../extensions/@webql/base32/verify/schemas/base32/procedures/decode.sql",
6766
"../../extensions/@webql/base32/verify/schemas/base32/procedures/encode.sql",
6867
"../../extensions/@webql/base32/verify/schemas/base32/schema.sql",
68+
"../../extensions/@webql/base32/webql-base32.control",
6969
]
7070
`;
7171

@@ -74,7 +74,7 @@ exports[`cmds:install - with initialized workspace and module installs a module
7474
comment = 'my-module extension'
7575
default_version = '0.0.1'
7676
module_pathname = '$libdir/my-module'
77-
requires = 'launchql-base32,plpgsql,uuid-ossp'
77+
requires = 'plpgsql,uuid-ossp,webql-base32'
7878
relocatable = false
7979
superuser = false
8080
"
@@ -87,8 +87,8 @@ exports[`cmds:install - with initialized workspace and module installs two modul
8787
"url": "https://github.com/undefined/undefined/issues",
8888
},
8989
"dependencies": {
90-
"@webql/base32": "1.1.2",
91-
"@webql/utils": "1.1.1",
90+
"@webql/base32": "1.2.1",
91+
"@webql/utils": "1.1.2",
9292
},
9393
"description": "undefined",
9494
"homepage": "https://github.com/undefined/undefined",
@@ -125,7 +125,7 @@ exports[`cmds:install - with initialized workspace and module installs two modul
125125
comment = 'my-module extension'
126126
default_version = '0.0.1'
127127
module_pathname = '$libdir/my-module'
128-
requires = 'launchql-base32,launchql-utils,plpgsql,uuid-ossp'
128+
requires = 'plpgsql,uuid-ossp,webql-base32,webql-utils'
129129
relocatable = false
130130
superuser = false
131131
"

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ function getExpectedFiles(pkg: string, version: string): string[] {
1818

1919
return [
2020
`${basePath}/package.json`,
21-
2221
`${basePath}/launchql.plan`,
2322
`${basePath}/Makefile`,
2423
`${basePath}/sql/${extname}--${version}.sql`,
@@ -68,7 +67,7 @@ describe('cmds:install - with initialized workspace and module', () => {
6867

6968
it('installs a module package', async () => {
7069
const pkg = '@webql/base32';
71-
const version = '1.1.2';
70+
const version = '1.2.1';
7271

7372
await fixture.runCmd({
7473
_: ['install', `${pkg}@${version}`],
@@ -98,12 +97,12 @@ describe('cmds:install - with initialized workspace and module', () => {
9897
it('installs two modules', async () => {
9998
const base32 = {
10099
name: '@webql/base32',
101-
version: '1.1.2'
100+
version: '1.2.1'
102101
};
103102

104103
const utils = {
105104
name: '@webql/utils',
106-
version: '1.1.1'
105+
version: '1.1.2'
107106
};
108107

109108
const pkgs = [base32, utils];

packages/core/__tests__/__snapshots__/mods.install.test.ts.snap

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,26 @@ exports[`installModule() installs a package and updates package.json dependencie
77
"deploy/schemas/base32/procedures/decode.sql",
88
"deploy/schemas/base32/procedures/encode.sql",
99
"deploy/schemas/base32/schema.sql",
10-
"launchql-base32.control",
10+
"jest.config.js",
1111
"launchql.plan",
1212
"package.json",
13+
"readme.md",
1314
"revert/schemas/base32/procedures/decode.sql",
1415
"revert/schemas/base32/procedures/encode.sql",
1516
"revert/schemas/base32/schema.sql",
16-
"sql/launchql-base32--0.0.3.sql",
17-
"test/__snapshots__/base32.decode.test.js.snap",
18-
"test/__snapshots__/base32.encode.test.js.snap",
19-
"test/base32.decode.test.js",
20-
"test/base32.encode.test.js",
21-
"test/utils/index.js",
17+
"sql/webql-base32--1.2.1.sql",
18+
"src/base32.ts",
19+
"src/index.ts",
20+
"test/__snapshots__/base32.decode.test.ts.snap",
21+
"test/__snapshots__/base32.encode.test.ts.snap",
22+
"test/base32.decode.test.ts",
23+
"test/base32.encode.test.ts",
24+
"tsconfig.esm.json",
25+
"tsconfig.json",
2226
"verify/schemas/base32/procedures/decode.sql",
2327
"verify/schemas/base32/procedures/encode.sql",
2428
"verify/schemas/base32/schema.sql",
29+
"webql-base32.control",
2530
]
2631
`;
2732

@@ -30,7 +35,7 @@ exports[`installModule() installs a package and updates package.json dependencie
3035
comment = 'totp extension'
3136
default_version = '0.0.1'
3237
module_pathname = '$libdir/totp'
33-
requires = 'launchql-base32,pgcrypto,plpgsql,uuid-ossp'
38+
requires = 'pgcrypto,plpgsql,uuid-ossp,webql-base32'
3439
relocatable = false
3540
superuser = false
3641
"

packages/core/__tests__/mods.install.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ afterEach(() => {
1818

1919
describe('installModule()', () => {
2020
it('installs a package and updates package.json dependencies', async () => {
21-
await mod.installModules('@webql/base32@1.0.0');
21+
await mod.installModules('@webql/base32@1.2.1');
2222

2323
const extDir = path.join(
2424
mod.getWorkspacePath()!,
@@ -37,7 +37,7 @@ describe('installModule()', () => {
3737
fs.readFileSync(path.join(mod.getModulePath()!, 'package.json'), 'utf-8')
3838
);
3939
expect(pkgJson.dependencies).toBeDefined();
40-
expect(pkgJson.dependencies['@webql/base32']).toBe('1.0.0');
40+
expect(pkgJson.dependencies['@webql/base32']).toBe('1.2.1');
4141

4242
const controlFileContent = mod.getModuleControlFile();
4343
expect(controlFileContent).toMatchSnapshot();
@@ -46,7 +46,7 @@ describe('installModule()', () => {
4646
it('throws if package.json does not exist in module', async () => {
4747
fs.rmSync(path.join(mod.getModulePath()!, 'package.json'));
4848
await expect(
49-
mod.installModules('@webql/base32@1.0.0')
49+
mod.installModules('@webql/base32@1.2.1')
5050
).rejects.toThrow(/No package\.json found/);
5151
});
5252
});

0 commit comments

Comments
 (0)