Skip to content

Commit ebfb9dd

Browse files
committed
Update version to 1.44.6, add Node.js import protocol setting, and clean up import statements across multiple files
1 parent 59c5be2 commit ebfb9dd

File tree

13 files changed

+52
-34
lines changed

13 files changed

+52
-34
lines changed

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"noDoubleEquals": "off"
1313
},
1414
"style": {
15-
"noNonNullAssertion": "off"
15+
"noNonNullAssertion": "off",
16+
"useNodejsImportProtocol": "off"
1617
},
1718
"a11y": {
1819
"useValidAnchor": "off"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-update-cli",
3-
"version": "1.44.5",
3+
"version": "1.44.6",
44
"description": "command line tool for react-native-update (remote updates for react native)",
55
"main": "index.js",
66
"bin": {

src/api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fetch from 'node-fetch';
2-
import fs from 'node:fs';
3-
import util from 'node:util';
4-
import path from 'node:path';
2+
import fs from 'fs';
3+
import util from 'util';
4+
import path from 'path';
55
import ProgressBar from 'progress';
66
import packageJson from '../package.json';
77
import tcpp from 'tcp-ping';

src/app.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { question } from './utils';
2-
import fs from 'node:fs';
2+
import fs from 'fs';
33
import Table from 'tty-table';
44

55
import { post, get, doDelete } from './api';
@@ -8,7 +8,6 @@ import { t } from './utils/i18n';
88

99
const validPlatforms = ['ios', 'android', 'harmony'];
1010

11-
1211
export function checkPlatform(platform: Platform) {
1312
if (!validPlatforms.includes(platform)) {
1413
throw new Error(t('unsupportedPlatform', { platform }));
@@ -79,7 +78,13 @@ export const commands = {
7978
options: { platform },
8079
});
8180
},
82-
deleteApp: async ({ args, options }: { args: string[]; options: { platform: Platform } }) => {
81+
deleteApp: async ({
82+
args,
83+
options,
84+
}: {
85+
args: string[];
86+
options: { platform: Platform };
87+
}) => {
8388
const { platform } = options;
8489
const id = args[0] || chooseApp(platform);
8590
if (!id) {
@@ -92,15 +97,23 @@ export const commands = {
9297
const { platform } = options;
9398
listApp(platform);
9499
},
95-
selectApp: async ({ args, options }: { args: string[]; options: { platform: Platform } }) => {
100+
selectApp: async ({
101+
args,
102+
options,
103+
}: {
104+
args: string[];
105+
options: { platform: Platform };
106+
}) => {
96107
const platform = checkPlatform(
97108
options.platform || (await question(t('platformQuestion'))),
98109
);
99110
const id = args[0]
100111
? Number.parseInt(args[0])
101112
: (await chooseApp(platform)).id;
102113

103-
let updateInfo: Partial<Record<Platform, { appId: number; appKey: string }>> = {};
114+
let updateInfo: Partial<
115+
Record<Platform, { appId: number; appKey: string }>
116+
> = {};
104117
if (fs.existsSync('update.json')) {
105118
try {
106119
updateInfo = JSON.parse(fs.readFileSync('update.json', 'utf8'));

src/bundle.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import path from 'node:path';
1+
import path from 'path';
22
import { translateOptions } from './utils';
33
import * as fs from 'fs-extra';
44
import { ZipFile as YazlZipFile } from 'yazl';
@@ -9,10 +9,10 @@ import {
99
} from 'yauzl';
1010
import { question, checkPlugins } from './utils';
1111
import { checkPlatform } from './app';
12-
import { spawn, spawnSync } from 'node:child_process';
12+
import { spawn, spawnSync } from 'child_process';
1313
import semverSatisfies from 'semver/functions/satisfies';
1414
const g2js = require('gradle-to-js/lib/parser');
15-
import os from 'node:os';
15+
import os from 'os';
1616
const properties = require('properties');
1717
import { depVersions } from './utils/dep-versions';
1818
import { t } from './utils/i18n';
@@ -901,7 +901,7 @@ function diffArgsCheck(args: string[], options: any, diffFn: string) {
901901
}
902902

903903
export const commands = {
904-
bundle: async function ({ options }) {
904+
bundle: async ({ options }) => {
905905
const platform = checkPlatform(
906906
options.platform || (await question(t('platformPrompt'))),
907907
);
@@ -970,7 +970,7 @@ export const commands = {
970970
metaInfo,
971971
},
972972
});
973-
973+
974974
if (isSentry) {
975975
await copyDebugidForSentry(bundleName, intermediaDir, sourcemapOutput);
976976
await uploadSourcemapForSentry(
@@ -990,7 +990,11 @@ export const commands = {
990990
},
991991
});
992992
if (isSentry) {
993-
await copyDebugidForSentry(bundleName, intermediaDir, sourcemapOutput);
993+
await copyDebugidForSentry(
994+
bundleName,
995+
intermediaDir,
996+
sourcemapOutput,
997+
);
994998
await uploadSourcemapForSentry(
995999
bundleName,
9961000
intermediaDir,

src/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { question } from './utils';
22
import { post, get, replaceSession, saveSession, closeSession } from './api';
3-
import crypto from 'node:crypto';
3+
import crypto from 'crypto';
44
import { t } from './utils/i18n';
55

66
function md5(str: string) {

src/utils/add-gitignore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import fs from 'node:fs';
2-
// import path from 'node:path';
1+
import fs from 'fs';
2+
// import path from 'path';
33
import { credentialFile, tempDir } from './constants';
44
import { t } from './i18n';
55

src/utils/check-lockfile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import fs from 'node:fs';
2-
import path from 'node:path';
1+
import fs from 'fs';
2+
import path from 'path';
33
import { t } from './i18n';
44

55
const lockFiles = [

src/utils/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import path from 'node:path';
1+
import path from 'path';
22

33
const scriptName = path.basename(process.argv[1]) as 'cresc' | 'pushy';
44
export const IS_CRESC = scriptName === 'cresc';

src/utils/git.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import git from 'isomorphic-git';
2-
import fs from 'node:fs';
3-
import path from 'node:path';
2+
import fs from 'fs';
3+
import path from 'path';
44

55
export interface CommitInfo {
66
hash: string;

src/utils/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from 'fs-extra';
2-
import os from 'node:os';
3-
import path from 'node:path';
2+
import os from 'os';
3+
import path from 'path';
44
import pkg from '../../package.json';
55
import AppInfoParser from './app-info-parser';
66
import semverSatisfies from 'semver/functions/satisfies';

src/utils/latest-version/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import {
1212
underline,
1313
yellow,
1414
} from '@colors/colors/safe';
15-
import { existsSync, readFileSync } from 'node:fs';
16-
import { dirname } from 'node:path';
15+
import { existsSync, readFileSync } from 'fs';
16+
import { dirname } from 'path';
1717
import latestVersion, {
1818
type Package,
1919
type PackageJson,

src/utils/latest-version/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
1+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
22
import type {
33
RequestOptions as HttpRequestOptions,
44
Agent,
55
IncomingMessage,
6-
} from 'node:http';
7-
import type { RequestOptions as HttpsRequestOptions } from 'node:https';
8-
import { join, dirname, resolve as pathResolve, parse } from 'node:path';
6+
} from 'http';
7+
import type { RequestOptions as HttpsRequestOptions } from 'https';
8+
import { join, dirname, resolve as pathResolve, parse } from 'path';
99
import { npm, yarn } from 'global-dirs';
10-
import { homedir } from 'node:os';
11-
import { URL } from 'node:url';
10+
import { homedir } from 'os';
11+
import { URL } from 'url';
1212

1313
import getRegistryUrl from 'registry-auth-token/registry-url';
1414
import registryAuthToken from 'registry-auth-token';

0 commit comments

Comments
 (0)