Module 9 · In Studio · challenge 3 of 3 in this lesson
challenges/work/version_req.luau treats 1.2.3 and ^1.2.3 as the same caret rule
A test in Studio grades it and prints a pass code.
Open
Level 3, Professional
Challenge
Write the rule your package manager uses to decide which updates are safe. Start from the m14-ship tag in the game repo, then run it with game.ServerScriptService.RunGameTests:Invoke("ecosystem-tools").
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("ecosystem-tools")in the server command bar. Copy the pass code from Output.
Done means
- challenges/work/version_req.luau treats 1.2.3 and ^1.2.3 as the same caret rule
- A version below 1.0.0 keeps its left-most non-zero number fixed
- ~1.2.3 allows patch changes only and =1.2.3 allows exactly 1.2.3
- Parts are compared as numbers and junk input returns false
- The ecosystem-tools challenge prints TEST PASS for all seven checks