Skip to content

Commit 2fcee8b

Browse files
authored
chore: fix v1 release issues (#890)
1 parent 666f265 commit 2fcee8b

File tree

8 files changed

+27
-16
lines changed

8 files changed

+27
-16
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ jobs:
113113
- name: Format
114114
run: yarn format:fix
115115

116+
- name: Ignore changes to useCLIMetadata.ts
117+
run: |
118+
git update-index --assume-unchanged src/lib/hooks/useCLIMetadata.ts
119+
116120
- name: Commit changes
117121
id: commit
118122
uses: EndBug/add-and-commit@v9

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [1.1.0](https://github.com/apify/apify-cli/releases/tag/v1.1.0) (2025-08-13)
5+
<!-- git-cliff-unreleased-start -->
6+
7+
## 0.21.10 - **not yet released**
68

79
### 🚀 Features
810

@@ -26,6 +28,8 @@ All notable changes to this project will be documented in this file.
2628
- [**breaking**] Move from yargs to node:util ([#871](https://github.com/apify/apify-cli/pull/871)) ([482d0b2](https://github.com/apify/apify-cli/commit/482d0b29f285c020320f1f2e3f0fd08a362d57cc)) by [@vladfrangu](https://github.com/vladfrangu), closes [#833](https://github.com/apify/apify-cli/issues/833)
2729
- [**breaking**] Make opening the actor build results in push opt-in ([#881](https://github.com/apify/apify-cli/pull/881)) ([d842424](https://github.com/apify/apify-cli/commit/d84242421387a9487eef5c07183dd0b8ac7ae67b)) by [@vladfrangu](https://github.com/vladfrangu)
2830

31+
<!-- git-cliff-unreleased-end -->
32+
2933
## [0.21.9](https://github.com/apify/apify-cli/releases/tag/v0.21.9) (2025-07-17)
3034

3135
### 🚀 Features

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apify-cli",
3-
"version": "1.1.0",
3+
"version": "0.21.10",
44
"description": "Apify command-line interface (CLI) helps you manage the Apify cloud platform and develop, build, and deploy Apify Actors.",
55
"exports": "./dist/index.js",
66
"type": "module",

src/commands/cli-management/install.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,11 @@ import { ApifyCommand } from '../../lib/command-framework/apify-command.js';
99
import { useCLIMetadata } from '../../lib/hooks/useCLIMetadata.js';
1010
import { useYesNoConfirm } from '../../lib/hooks/user-confirmations/useYesNoConfirm.js';
1111
import { info, simpleLog, success, warning } from '../../lib/outputs.js';
12+
import { tildify } from '../../lib/utils.js';
1213
import { cliDebugPrint } from '../../lib/utils/cliDebugPrint.js';
1314

1415
const pathToInstallMarker = (installPath: string) => join(installPath, '.install-marker');
1516

16-
const tildify = (path: string) => {
17-
if (path.startsWith(process.env.HOME!)) {
18-
return path.replace(process.env.HOME!, '~');
19-
}
20-
21-
return path;
22-
};
23-
2417
export class InstallCommand extends ApifyCommand<typeof InstallCommand> {
2518
static override name = 'install' as const;
2619

src/commands/login.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { updateUserId } from '../lib/hooks/telemetry/useTelemetryState.js';
1616
import { useMaskedInput } from '../lib/hooks/user-confirmations/useMaskedInput.js';
1717
import { useSelectFromList } from '../lib/hooks/user-confirmations/useSelectFromList.js';
1818
import { error, info, success } from '../lib/outputs.js';
19-
import { getLocalUserInfo, getLoggedClient } from '../lib/utils.js';
19+
import { getLocalUserInfo, getLoggedClient, tildify } from '../lib/utils.js';
2020

2121
const CONSOLE_BASE_URL = 'https://console.apify.com/settings/integrations';
2222
// const CONSOLE_BASE_URL = 'http://localhost:3000/settings/integrations';
@@ -49,7 +49,7 @@ export class LoginCommand extends ApifyCommand<typeof LoginCommand> {
4949
static override name = 'login' as const;
5050

5151
static override description =
52-
`Authenticates your Apify account and saves credentials to '${AUTH_FILE_PATH()}'.\n` +
52+
`Authenticates your Apify account and saves credentials to '${tildify(AUTH_FILE_PATH())}'.\n` +
5353
`All other commands use these stored credentials.\n\n` +
5454
`Run 'apify logout' to remove authentication.`;
5555

src/commands/logout.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { AUTH_FILE_PATH } from '../lib/consts.js';
33
import { rimrafPromised } from '../lib/files.js';
44
import { updateUserId } from '../lib/hooks/telemetry/useTelemetryState.js';
55
import { success } from '../lib/outputs.js';
6+
import { tildify } from '../lib/utils.js';
67

78
export class LogoutCommand extends ApifyCommand<typeof LogoutCommand> {
89
static override name = 'logout' as const;
910

1011
static override description =
11-
`Removes authentication by deleting your API token and account information from '${AUTH_FILE_PATH()}'.\n` +
12+
`Removes authentication by deleting your API token and account information from '${tildify(AUTH_FILE_PATH())}'.\n` +
1213
`Run 'apify login' to authenticate again.`;
1314

1415
async run() {

src/lib/hooks/useCLIMetadata.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export const DEVELOPMENT_VERSION_MARKER = '0.0.0';
77
export const DEVELOPMENT_HASH_MARKER = '0000000';
88

99
// These values are replaced with the actual values when building the CLI
10-
const CLI_VERSION = '1.1.0';
11-
const CLI_HASH = '374b97ff683c806b2e630026d786333ab7842f2f';
10+
const CLI_VERSION = DEVELOPMENT_VERSION_MARKER;
11+
const CLI_HASH = DEVELOPMENT_HASH_MARKER;
1212

1313
export type InstallMethod = 'npm' | 'pnpm' | 'homebrew' | 'volta' | 'bundle' | 'bun';
1414

@@ -113,7 +113,7 @@ export function useCLIMetadata(): CLIMetadata {
113113
return `apify-cli/${this.version} (${this.hash.slice(0, 7)}) running on ${this.platform}-${this.arch} with ${this.runtime.runtime}-${runtime.version}${this.extraRuntimeData ? ` ${this.extraRuntimeData}` : ''}, installed via ${this.installMethod}`;
114114
},
115115
get isBeta() {
116-
return this.version.includes('beta') || this.version === '1.1.0';
116+
return this.version.includes('beta') || this.version === DEVELOPMENT_VERSION_MARKER;
117117
},
118118
};
119119

src/lib/utils.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, wr
22
import { mkdir, readFile } from 'node:fs/promises';
33
import type { IncomingMessage } from 'node:http';
44
import { get } from 'node:https';
5+
import { homedir } from 'node:os';
56
import { dirname, join } from 'node:path';
67
import process from 'node:process';
78
import { finished } from 'node:stream/promises';
@@ -590,3 +591,11 @@ export function mapGroupBy<K, T>(items: Iterable<T>, keySelector: (item: T, inde
590591
export function printJsonToStdout(object: unknown) {
591592
console.log(JSON.stringify(object, null, 2));
592593
}
594+
595+
export const tildify = (path: string) => {
596+
if (path.startsWith(homedir())) {
597+
return path.replace(homedir(), '~');
598+
}
599+
600+
return path;
601+
};

0 commit comments

Comments
 (0)