shakapacker 8.0.0.pre.rc.1 → 8.0.0.rc.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,34 @@
1
+ lockfileVersion: '9.0'
2
+
3
+ settings:
4
+ autoInstallPeers: true
5
+ excludeLinksFromLockfile: false
6
+
7
+ importers:
8
+
9
+ .:
10
+ dependencies:
11
+ left-pad:
12
+ specifier: 1.0.2
13
+ version: 1.0.2
14
+ devDependencies:
15
+ right-pad:
16
+ specifier: ^1.0.1
17
+ version: 1.0.1
18
+
19
+ packages:
20
+
21
+ left-pad@1.0.2:
22
+ resolution: {integrity: sha512-i+siCE/qH/g/aFBfv9alTWzGetfoI8pw4mT4L4DA1kcCZwxnLzCpW5W96BmcNZvSsEStD0mn3NInNjp+CXb1lw==}
23
+ deprecated: use String.prototype.padStart()
24
+
25
+ right-pad@1.0.1:
26
+ resolution: {integrity: sha512-bYBjgxmkvTAfgIYy328fmkwhp39v8lwVgWhhrzxPV3yHtcSqyYKe9/XOhvW48UFjATg3VuJbpsp5822ACNvkmw==}
27
+ engines: {node: '>= 0.10'}
28
+ deprecated: Please use String.prototype.padEnd() over this package.
29
+
30
+ snapshots:
31
+
32
+ left-pad@1.0.2: {}
33
+
34
+ right-pad@1.0.1: {}
@@ -1295,4 +1295,175 @@ describe "VersionChecker::NodePackageVersion" do
1295
1295
  end
1296
1296
  end
1297
1297
  end
1298
+
1299
+ context "with pnpm-lock.yaml v9" do
1300
+ def node_package_version(fixture_version:)
1301
+ Shakapacker::VersionChecker::NodePackageVersion.new(
1302
+ File.expand_path("../fixtures/#{fixture_version}_package.json", __dir__),
1303
+ "file/does/not/exist",
1304
+ "file/does/not/exist",
1305
+ File.expand_path("../fixtures/#{fixture_version}_pnpm-lock.v9.yaml", __dir__)
1306
+ )
1307
+ end
1308
+
1309
+ context "when using an exact semantic version" do
1310
+ let(:node_package_version_from_semver_exact) { node_package_version(fixture_version: "semver_exact") }
1311
+
1312
+ it "#raw returns the raw version" do
1313
+ expect(node_package_version_from_semver_exact.raw).to eq "6.0.0"
1314
+ end
1315
+
1316
+ it "#major_minor_patch returns an array" do
1317
+ expect(node_package_version_from_semver_exact.major_minor_patch).to eq ["6", "0", "0"]
1318
+ end
1319
+
1320
+ it "#skip_processing? returns false" do
1321
+ expect(node_package_version_from_semver_exact.skip_processing?).to be false
1322
+ end
1323
+
1324
+ it "#semver_wildcard? returns false" do
1325
+ expect(node_package_version_from_semver_exact.semver_wildcard?).to be false
1326
+ end
1327
+ end
1328
+
1329
+ context "when using a beta version" do
1330
+ let(:node_package_version_from_beta) { node_package_version(fixture_version: "beta") }
1331
+
1332
+ it "#raw returns the raw version" do
1333
+ expect(node_package_version_from_beta.raw).to eq "6.1.0-beta.0"
1334
+ end
1335
+
1336
+ it "#major_minor_patch returns an array" do
1337
+ expect(node_package_version_from_beta.major_minor_patch).to eq ["6", "1", "0"]
1338
+ end
1339
+
1340
+ it "#skip_processing? returns false" do
1341
+ expect(node_package_version_from_beta.skip_processing?).to be false
1342
+ end
1343
+
1344
+ it "#semver_wildcard? returns false" do
1345
+ expect(node_package_version_from_beta.semver_wildcard?).to be false
1346
+ end
1347
+ end
1348
+
1349
+ context "when using a caret constraint" do
1350
+ let(:node_package_version_from_semver_caret) { node_package_version(fixture_version: "semver_caret") }
1351
+
1352
+ it "#raw returns the raw version" do
1353
+ expect(node_package_version_from_semver_caret.raw).to eq "6.6.0"
1354
+ end
1355
+
1356
+ it "#major_minor_patch returns an array" do
1357
+ expect(node_package_version_from_semver_caret.major_minor_patch).to eq ["6", "6", "0"]
1358
+ end
1359
+
1360
+ it "#skip_processing? returns false" do
1361
+ expect(node_package_version_from_semver_caret.skip_processing?).to be false
1362
+ end
1363
+
1364
+ it "#semver_wildcard? returns false" do
1365
+ expect(node_package_version_from_semver_caret.semver_wildcard?).to be false
1366
+ end
1367
+ end
1368
+
1369
+ context "when using a tilde constraint" do
1370
+ let(:node_package_version_from_semver_tilde) { node_package_version(fixture_version: "semver_tilde") }
1371
+
1372
+ it "#raw returns the raw version" do
1373
+ expect(node_package_version_from_semver_tilde.raw).to eq "6.0.2"
1374
+ end
1375
+
1376
+ it "#major_minor_patch returns an array" do
1377
+ expect(node_package_version_from_semver_tilde.major_minor_patch).to eq ["6", "0", "2"]
1378
+ end
1379
+
1380
+ it "#skip_processing? returns false" do
1381
+ expect(node_package_version_from_semver_tilde.skip_processing?).to be false
1382
+ end
1383
+
1384
+ it "#semver_wildcard? returns false" do
1385
+ expect(node_package_version_from_semver_tilde.semver_wildcard?).to be false
1386
+ end
1387
+ end
1388
+
1389
+ context "when using a relative path" do
1390
+ let(:node_package_version_from_relative_path) { node_package_version(fixture_version: "relative_path") }
1391
+
1392
+ it "#raw returns the raw version" do
1393
+ expect(node_package_version_from_relative_path.raw).to eq "../.."
1394
+ end
1395
+
1396
+ it "#major_minor_patch returns nil" do
1397
+ expect(node_package_version_from_relative_path.major_minor_patch).to be nil
1398
+ end
1399
+
1400
+ it "#skip_processing? returns true" do
1401
+ expect(node_package_version_from_relative_path.skip_processing?).to be true
1402
+ end
1403
+
1404
+ it "#semver_wildcard? returns false" do
1405
+ expect(node_package_version_from_relative_path.semver_wildcard?).to be false
1406
+ end
1407
+ end
1408
+
1409
+ context "when using a git url" do
1410
+ let(:node_package_version_from_git_url) { node_package_version(fixture_version: "git_url") }
1411
+
1412
+ it "#raw returns the raw version" do
1413
+ expect(node_package_version_from_git_url.raw).to eq "8.0.0-rc.2"
1414
+ end
1415
+
1416
+ it "#major_minor_patch returns an array" do
1417
+ expect(node_package_version_from_git_url.major_minor_patch).to eq ["8", "0", "0"]
1418
+ end
1419
+
1420
+ it "#skip_processing? returns false" do
1421
+ expect(node_package_version_from_git_url.skip_processing?).to be false
1422
+ end
1423
+
1424
+ it "#semver_wildcard? returns false" do
1425
+ expect(node_package_version_from_git_url.semver_wildcard?).to be false
1426
+ end
1427
+ end
1428
+
1429
+ context "when using a github url" do
1430
+ let(:node_package_version_from_github_url) { node_package_version(fixture_version: "github_url") }
1431
+
1432
+ it "#raw returns the raw version" do
1433
+ expect(node_package_version_from_github_url.raw).to eq "8.0.0-rc.2"
1434
+ end
1435
+
1436
+ it "#major_minor_patch returns an array" do
1437
+ expect(node_package_version_from_github_url.major_minor_patch).to eq ["8", "0", "0"]
1438
+ end
1439
+
1440
+ it "#skip_processing? returns false" do
1441
+ expect(node_package_version_from_github_url.skip_processing?).to be false
1442
+ end
1443
+
1444
+ it "#semver_wildcard? returns false" do
1445
+ expect(node_package_version_from_github_url.semver_wildcard?).to be false
1446
+ end
1447
+ end
1448
+
1449
+ context "when shakapacker is not a dependency" do
1450
+ let(:node_package_version_from_without) { node_package_version(fixture_version: "without") }
1451
+
1452
+ it "#raw returns an empty string" do
1453
+ expect(node_package_version_from_without.raw).to eq ""
1454
+ end
1455
+
1456
+ it "#major_minor_patch returns nil" do
1457
+ expect(node_package_version_from_without.major_minor_patch).to be nil
1458
+ end
1459
+
1460
+ it "#skip_processing? returns true" do
1461
+ expect(node_package_version_from_without.skip_processing?).to be true
1462
+ end
1463
+
1464
+ it "#semver_wildcard? returns false" do
1465
+ expect(node_package_version_from_without.semver_wildcard?).to be false
1466
+ end
1467
+ end
1468
+ end
1298
1469
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shakapacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0.pre.rc.1
4
+ version: 8.0.0.rc.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-05-08 00:00:00.000000000 Z
13
+ date: 2024-05-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -355,6 +355,7 @@ files:
355
355
  - spec/fixtures/beta_package.json
356
356
  - spec/fixtures/beta_pnpm-lock.v7.yaml
357
357
  - spec/fixtures/beta_pnpm-lock.v8.yaml
358
+ - spec/fixtures/beta_pnpm-lock.v9.yaml
358
359
  - spec/fixtures/beta_yarn.v1.lock
359
360
  - spec/fixtures/beta_yarn.v2.lock
360
361
  - spec/fixtures/git_url_package-lock.v1.json
@@ -362,6 +363,7 @@ files:
362
363
  - spec/fixtures/git_url_package.json
363
364
  - spec/fixtures/git_url_pnpm-lock.v7.yaml
364
365
  - spec/fixtures/git_url_pnpm-lock.v8.yaml
366
+ - spec/fixtures/git_url_pnpm-lock.v9.yaml
365
367
  - spec/fixtures/git_url_yarn.v1.lock
366
368
  - spec/fixtures/git_url_yarn.v2.lock
367
369
  - spec/fixtures/github_url_package-lock.v1.json
@@ -369,6 +371,7 @@ files:
369
371
  - spec/fixtures/github_url_package.json
370
372
  - spec/fixtures/github_url_pnpm-lock.v7.yaml
371
373
  - spec/fixtures/github_url_pnpm-lock.v8.yaml
374
+ - spec/fixtures/github_url_pnpm-lock.v9.yaml
372
375
  - spec/fixtures/github_url_yarn.v1.lock
373
376
  - spec/fixtures/github_url_yarn.v2.lock
374
377
  - spec/fixtures/relative_path_package-lock.v1.json
@@ -376,6 +379,7 @@ files:
376
379
  - spec/fixtures/relative_path_package.json
377
380
  - spec/fixtures/relative_path_pnpm-lock.v7.yaml
378
381
  - spec/fixtures/relative_path_pnpm-lock.v8.yaml
382
+ - spec/fixtures/relative_path_pnpm-lock.v9.yaml
379
383
  - spec/fixtures/relative_path_yarn.v1.lock
380
384
  - spec/fixtures/relative_path_yarn.v2.lock
381
385
  - spec/fixtures/semver_caret_package-lock.v1.json
@@ -383,6 +387,7 @@ files:
383
387
  - spec/fixtures/semver_caret_package.json
384
388
  - spec/fixtures/semver_caret_pnpm-lock.v7.yaml
385
389
  - spec/fixtures/semver_caret_pnpm-lock.v8.yaml
390
+ - spec/fixtures/semver_caret_pnpm-lock.v9.yaml
386
391
  - spec/fixtures/semver_caret_yarn.v1.lock
387
392
  - spec/fixtures/semver_caret_yarn.v2.lock
388
393
  - spec/fixtures/semver_exact_package-lock.v1.json
@@ -390,6 +395,7 @@ files:
390
395
  - spec/fixtures/semver_exact_package.json
391
396
  - spec/fixtures/semver_exact_pnpm-lock.v7.yaml
392
397
  - spec/fixtures/semver_exact_pnpm-lock.v8.yaml
398
+ - spec/fixtures/semver_exact_pnpm-lock.v9.yaml
393
399
  - spec/fixtures/semver_exact_yarn.v1.lock
394
400
  - spec/fixtures/semver_exact_yarn.v2.lock
395
401
  - spec/fixtures/semver_tilde_package-lock.v1.json
@@ -397,6 +403,7 @@ files:
397
403
  - spec/fixtures/semver_tilde_package.json
398
404
  - spec/fixtures/semver_tilde_pnpm-lock.v7.yaml
399
405
  - spec/fixtures/semver_tilde_pnpm-lock.v8.yaml
406
+ - spec/fixtures/semver_tilde_pnpm-lock.v9.yaml
400
407
  - spec/fixtures/semver_tilde_yarn.v1.lock
401
408
  - spec/fixtures/semver_tilde_yarn.v2.lock
402
409
  - spec/fixtures/without_package-lock.v1.json
@@ -404,6 +411,7 @@ files:
404
411
  - spec/fixtures/without_package.json
405
412
  - spec/fixtures/without_pnpm-lock.v7.yaml
406
413
  - spec/fixtures/without_pnpm-lock.v8.yaml
414
+ - spec/fixtures/without_pnpm-lock.v9.yaml
407
415
  - spec/fixtures/without_yarn.v1.lock
408
416
  - spec/fixtures/without_yarn.v2.lock
409
417
  - spec/generator_specs/e2e_template/files/app/controllers/home_controller.rb
@@ -498,7 +506,7 @@ homepage: https://github.com/shakacode/shakapacker
498
506
  licenses:
499
507
  - MIT
500
508
  metadata:
501
- source_code_uri: https://github.com/shakacode/shakapacker/tree/v8.0.0-rc.1
509
+ source_code_uri: https://github.com/shakacode/shakapacker/tree/v8.0.0-rc.3
502
510
  post_install_message:
503
511
  rdoc_options: []
504
512
  require_paths: