Skip to content

Commit 15dc5f3

Browse files
authored
refactor: Downgrades globby to v15 (#1006)
Downgrades the globby dependency from v16 to v15.
1 parent e6b82fb commit 15dc5f3

6 files changed

Lines changed: 27 additions & 45 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"escape-string-regexp": "~5.0.0",
9393
"execa": "^9.5.2",
9494
"express": "~5.2.0",
95-
"globby": "~16.1.0",
95+
"globby": "~15.0.0",
9696
"handlebars": "~4.7.8",
9797
"indent-string": "^5.0.0",
9898
"is-ci": "~4.1.0",

test/api/commands/call.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('[api] apify call', () => {
7070

7171
toggleCwdBetweenFullAndParentPath();
7272

73-
await testRunCommand(ActorsPushCommand, { flags_force: true });
73+
await testRunCommand(ActorsPushCommand, { flags_noPrompt: true, flags_force: true });
7474

7575
actorId = `${username}/${ACTOR_NAME}`;
7676

test/api/commands/push.test.ts

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { createHmacSignature } from '@apify/utilities';
88

99
import { testRunCommand } from '../../../src/lib/command-framework/apify-command.js';
1010
import { LOCAL_CONFIG_PATH } from '../../../src/lib/consts.js';
11-
import { execWithLog } from '../../../src/lib/exec.js';
1211
import { createSourceFiles, getActorLocalFilePaths, getLocalUserInfo } from '../../../src/lib/utils.js';
1312
import { testUserClient } from '../../__setup__/config.js';
1413
import { TEST_TIMEOUT } from '../../__setup__/consts.js';
@@ -90,7 +89,7 @@ describe('[api] apify push', () => {
9089
};
9190
writeFileSync(joinPath(LOCAL_CONFIG_PATH), JSON.stringify(actorJson, null, '\t'), { flag: 'w' });
9291

93-
await testRunCommand(ActorsPushCommand, { flags_force: true });
92+
await testRunCommand(ActorsPushCommand, { flags_noPrompt: true, flags_force: true });
9493

9594
const userInfo = await getLocalUserInfo();
9695
const { name } = actorJson;
@@ -129,6 +128,7 @@ describe('[api] apify push', () => {
129128

130129
await testRunCommand(ActorsPushCommand, {
131130
args_actorId: testActor.id,
131+
flags_noPrompt: true,
132132
flags_force: true,
133133
});
134134

@@ -182,7 +182,7 @@ describe('[api] apify push', () => {
182182
delete actorJson.environmentVariables;
183183
writeFileSync(joinPath(LOCAL_CONFIG_PATH), JSON.stringify(actorJson, null, '\t'), { flag: 'w' });
184184

185-
await testRunCommand(ActorsPushCommand, { args_actorId: testActor.id });
185+
await testRunCommand(ActorsPushCommand, { args_actorId: testActor.id, flags_noPrompt: true });
186186

187187
testActor = (await testActorClient.get())!;
188188
const testActorVersion = await testActorClient.version(actorJson.version).get();
@@ -229,7 +229,7 @@ describe('[api] apify push', () => {
229229
// Create large file to ensure Actor will be uploaded as zip
230230
writeFileSync(joinPath('3mb-file.txt'), Buffer.alloc(1024 * 1024 * 3));
231231

232-
await testRunCommand(ActorsPushCommand, { args_actorId: testActor.id });
232+
await testRunCommand(ActorsPushCommand, { args_actorId: testActor.id, flags_noPrompt: true });
233233

234234
// Remove the big file so sources in following tests are not zipped
235235
unlinkSync(joinPath('3mb-file.txt'));
@@ -275,7 +275,7 @@ describe('[api] apify push', () => {
275275

276276
writeFileSync(joinPath('some-typescript-file.ts'), `console.log('ok');`);
277277

278-
await testRunCommand(ActorsPushCommand, { flags_force: true });
278+
await testRunCommand(ActorsPushCommand, { flags_noPrompt: true, flags_force: true });
279279

280280
if (existsSync(joinPath('some-typescript-file.ts'))) unlinkSync(joinPath('some-typescript-file.ts'));
281281

@@ -307,7 +307,7 @@ describe('[api] apify push', () => {
307307
// @ts-expect-error Wrong typing of update method
308308
await testActorClient.version(actorJson.version).update({ buildTag: 'beta' });
309309

310-
await testRunCommand(ActorsPushCommand, { args_actorId: testActor.id });
310+
await testRunCommand(ActorsPushCommand, { args_actorId: testActor.id, flags_noPrompt: true });
311311
if (testActor) await testActorClient.delete();
312312

313313
expect(lastErrorMessage()).to.includes('is already on the platform');
@@ -325,7 +325,7 @@ describe('[api] apify push', () => {
325325
actorJson.description = 'This is a custom description for the actor.';
326326

327327
writeFileSync(joinPath(LOCAL_CONFIG_PATH), JSON.stringify(actorJson, null, '\t'), { flag: 'w' });
328-
await testRunCommand(ActorsPushCommand, { flags_force: true });
328+
await testRunCommand(ActorsPushCommand, { flags_noPrompt: true, flags_force: true });
329329

330330
const userInfo = await getLocalUserInfo();
331331
const actorId = `${userInfo.username}/${actorJson.name}`;
@@ -359,7 +359,7 @@ describe('[api] apify push', () => {
359359
delete actorJson.description;
360360
writeFileSync(joinPath(LOCAL_CONFIG_PATH), JSON.stringify(actorJson, null, '\t'), { flag: 'w' });
361361

362-
await testRunCommand(ActorsPushCommand, { args_actorId: testActor.id });
362+
await testRunCommand(ActorsPushCommand, { args_actorId: testActor.id, flags_noPrompt: true });
363363

364364
testActor = (await testActorClient.get())!;
365365

@@ -381,7 +381,7 @@ describe('[api] apify push', () => {
381381

382382
forceNewCwd('empty-dir');
383383

384-
await testRunCommand(ActorsPushCommand, {});
384+
await testRunCommand(ActorsPushCommand, { flags_noPrompt: true });
385385

386386
expect(lastErrorMessage()).to.include(
387387
'You need to call this command from a folder that has an Actor in it',
@@ -401,13 +401,7 @@ describe('[api] apify push', () => {
401401

402402
await writeFile(joinCwdPath('owo.txt'), 'Lorem ipsum');
403403

404-
await execWithLog({
405-
cmd: 'git',
406-
args: ['init'],
407-
opts: { cwd: joinCwdPath() },
408-
});
409-
410-
await testRunCommand(ActorsPushCommand, {});
404+
await testRunCommand(ActorsPushCommand, { flags_noPrompt: true });
411405

412406
expect(lastErrorMessage()).to.include('A valid Actor could not be found in the current directory.');
413407
},

test/api/commands/task/run.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ describe('[api] apify task run', () => {
5959
toggleCwdBetweenFullAndParentPath();
6060

6161
await testRunCommand(ActorsPushCommand, {
62+
flags_noPrompt: true,
6263
flags_force: true,
6364
});
6465

test/local/lib/utils.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ describe('Utils', () => {
3535
beforeAll(async () => {
3636
await beforeAllCalls();
3737

38-
await execWithLog({
39-
cmd: 'git',
40-
args: ['init'],
41-
opts: { cwd: tmpPath },
42-
});
43-
4438
FOLDERS.concat(FOLDERS_TO_IGNORE).forEach((folder) => {
4539
ensureFolderExistsSync(tmpPath, folder);
4640
});

yarn.lock

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,7 @@ __metadata:
23152315
eslint-config-prettier: "npm:^10.1.2"
23162316
execa: "npm:^9.5.2"
23172317
express: "npm:~5.2.0"
2318-
globby: "npm:~16.1.0"
2318+
globby: "npm:~15.0.0"
23192319
handlebars: "npm:~4.7.8"
23202320
indent-string: "npm:^5.0.0"
23212321
is-ci: "npm:~4.1.0"
@@ -4929,17 +4929,17 @@ __metadata:
49294929
languageName: node
49304930
linkType: hard
49314931

4932-
"globby@npm:~16.1.0":
4933-
version: 16.1.0
4934-
resolution: "globby@npm:16.1.0"
4932+
"globby@npm:~15.0.0":
4933+
version: 15.0.0
4934+
resolution: "globby@npm:15.0.0"
49354935
dependencies:
49364936
"@sindresorhus/merge-streams": "npm:^4.0.0"
49374937
fast-glob: "npm:^3.3.3"
49384938
ignore: "npm:^7.0.5"
4939-
is-path-inside: "npm:^4.0.0"
4939+
path-type: "npm:^6.0.0"
49404940
slash: "npm:^5.1.0"
4941-
unicorn-magic: "npm:^0.4.0"
4942-
checksum: 10c0/45dd4dd8311401b37ed426ad7ea7a6e8fdda2518bb0d62fbf0a46c2e6b81bcbd2c8d4fbcbcf4c0600bba15c5a8f4621785d0177acbb1b545f02f6b49f2cdbe24
4941+
unicorn-magic: "npm:^0.3.0"
4942+
checksum: 10c0/e4107be0579bcdd9642b8dff86aeafeaf62b2b9dd116669ab6e02e0e0c07ada0d972c2db182dee7588b460fe8c8919ddcc6b1cc4db405ca3a2adc9d35fa6eb21
49434943
languageName: node
49444944
linkType: hard
49454945

@@ -5579,13 +5579,6 @@ __metadata:
55795579
languageName: node
55805580
linkType: hard
55815581

5582-
"is-path-inside@npm:^4.0.0":
5583-
version: 4.0.0
5584-
resolution: "is-path-inside@npm:4.0.0"
5585-
checksum: 10c0/51188d7e2b1d907a9a5f7c18d99a90b60870b951ed87cf97595d9aaa429d4c010652c3350bcbf31182e7f4b0eab9a1860b43e16729b13cb1a44baaa6cdb64c46
5586-
languageName: node
5587-
linkType: hard
5588-
55895582
"is-plain-obj@npm:^4.1.0":
55905583
version: 4.1.0
55915584
resolution: "is-plain-obj@npm:4.1.0"
@@ -6994,6 +6987,13 @@ __metadata:
69946987
languageName: node
69956988
linkType: hard
69966989

6990+
"path-type@npm:^6.0.0":
6991+
version: 6.0.0
6992+
resolution: "path-type@npm:6.0.0"
6993+
checksum: 10c0/55baa8b1187d6dc683d5a9cfcc866168d6adff58e5db91126795376d818eee46391e00b2a4d53e44d844c7524a7d96aa68cc68f4f3e500d3d069a39e6535481c
6994+
languageName: node
6995+
linkType: hard
6996+
69976997
"pathe@npm:^2.0.1, pathe@npm:^2.0.3":
69986998
version: 2.0.3
69996999
resolution: "pathe@npm:2.0.3"
@@ -8883,13 +8883,6 @@ __metadata:
88838883
languageName: node
88848884
linkType: hard
88858885

8886-
"unicorn-magic@npm:^0.4.0":
8887-
version: 0.4.0
8888-
resolution: "unicorn-magic@npm:0.4.0"
8889-
checksum: 10c0/cd6eff90967a5528dfa2016bdb5b38b0cd64c8558f9ba04fb5c2c23f3a232a67dfe2bfa4c45af3685d5f1a40dbac6a36d48e053f80f97ae4da1e0f6a55431685
8890-
languageName: node
8891-
linkType: hard
8892-
88938886
"unique-filename@npm:^5.0.0":
88948887
version: 5.0.0
88958888
resolution: "unique-filename@npm:5.0.0"

0 commit comments

Comments
 (0)