Skip to content

Commit 2633173

Browse files
committed
3.2.0-alpha.1
1 parent 8181471 commit 2633173

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devalade/shipnode",
3-
"version": "3.2.0-alpha.0",
3+
"version": "3.2.0-alpha.1",
44
"description": "Deploy Node.js apps to a single VPS with zero configuration",
55
"type": "module",
66
"main": "dist/index.js",

tests/unit/ci-github.test.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ async function readWorkflow(root: string): Promise<string> {
2222
return readFile(join(root, '.github', 'workflows', 'shipnode-deploy.yml'), 'utf8');
2323
}
2424

25+
async function currentPackageSpec(): Promise<string> {
26+
const metadata: unknown = JSON.parse(
27+
await readFile(join(process.cwd(), 'package.json'), 'utf8'),
28+
);
29+
if (
30+
typeof metadata !== 'object' ||
31+
metadata === null ||
32+
!('name' in metadata) ||
33+
!('version' in metadata) ||
34+
typeof metadata.name !== 'string' ||
35+
typeof metadata.version !== 'string'
36+
) {
37+
throw new Error('Invalid package metadata in test fixture');
38+
}
39+
return `${metadata.name}@${metadata.version}`;
40+
}
41+
2542
afterEach(async () => {
2643
process.exitCode = undefined;
2744
await Promise.all(temporaryDirectories.splice(0).map((directory) => rm(directory, { recursive: true, force: true })));
@@ -37,7 +54,7 @@ describe('ci github', () => {
3754

3855
const workflow = await readWorkflow(root);
3956
expect(() => load(workflow)).not.toThrow();
40-
expect(workflow).toContain('npm install -g @devalade/shipnode@3.2.0-alpha.0');
57+
expect(workflow).toContain(`npm install -g ${await currentPackageSpec()}`);
4158
expect(workflow).not.toContain('paths:');
4259
expect(workflow).not.toContain('working-directory:');
4360
expect(workflow).not.toContain('- name: Build');

0 commit comments

Comments
 (0)