@quenty/loader 6.0.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.0.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/loader@6.0.0...@quenty/loader@6.0.1) (2022-11-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Fix hoarcekat stories not loading correctly when installed in a flat version of the repository (for example, via normal npm install @quenty/blend) ([02772ca](https://github.com/Quenty/NevermoreEngine/commit/02772caf01fd5c055edf64c7f26b2c06b379e9e3))
12
+
13
+
14
+
15
+
16
+
6
17
  # [6.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/loader@5.0.1...@quenty/loader@6.0.0) (2022-09-27)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/loader",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "A simple module loader for Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,5 +26,5 @@
26
26
  "publishConfig": {
27
27
  "access": "public"
28
28
  },
29
- "gitHead": "cbbe2a3e91f0d1e337bb33652b4e32bec685bb76"
29
+ "gitHead": "8b9877c26a3fc753409a5114e56717837291279d"
30
30
  }
@@ -155,6 +155,8 @@ function StaticLegacyLoader:_findPackageRoot(instance)
155
155
  while current and current ~= game do
156
156
  if LoaderUtils.isPackage(current) then
157
157
  return current
158
+ elseif self:_couldBePackageRootTopLevel(current) then
159
+ return current
158
160
  else
159
161
  current = current.Parent
160
162
  end
@@ -163,6 +165,20 @@ function StaticLegacyLoader:_findPackageRoot(instance)
163
165
  return nil
164
166
  end
165
167
 
168
+ function StaticLegacyLoader:_couldBePackageRootTopLevel(current)
169
+ for _, instance in pairs(current:GetChildren()) do
170
+ if instance:IsA("Folder") and instance.Name:sub(1, 1) == "@" then
171
+ for _, item in pairs(instance:GetChildren()) do
172
+ if LoaderUtils.isPackage(item) then
173
+ return true
174
+ end
175
+ end
176
+ end
177
+ end
178
+
179
+ return true
180
+ end
181
+
166
182
  function StaticLegacyLoader:_ensureFakeLoader(module)
167
183
  assert(typeof(module) == "Instance", "Bad module")
168
184