@quenty/promise 3.2.0 → 3.3.0

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
+ # [3.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/promise@3.2.0...@quenty/promise@3.3.0) (2021-12-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Use Promies.spawn() since task.spawn() is probably cheaper now ([6a069c2](https://github.com/Quenty/NevermoreEngine/commit/6a069c2a1c99ca34f53af747a969d5f5c4044e84))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/promise@3.1.2...@quenty/promise@3.2.0) (2021-11-20)
7
18
 
8
19
 
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014 Quenty
3
+ Copyright (c) 2014-2021 Quenty
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/promise",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "Promise implementation for Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -32,5 +32,5 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "87ab1435a59a05e7dd745db1dfcec26116d1d71d"
35
+ "gitHead": "6eb398e9fb81191f0815885f807ab0cb3bb9bad1"
36
36
  }
@@ -12,17 +12,13 @@ return function(parent, name, timeOut)
12
12
  return Promise.resolved(result)
13
13
  end
14
14
 
15
- return Promise.new(function(resolve, reject)
16
- -- Cheaper to do spawn() here than deferred, and we aren't going to get the
17
- -- resource for another tick anyway
18
- spawn(function()
19
- local child = parent:WaitForChild(name, timeOut)
15
+ return Promise.spawn(function(resolve, reject)
16
+ local child = parent:WaitForChild(name, timeOut)
20
17
 
21
- if child then
22
- resolve(child)
23
- else
24
- reject("Timed out")
25
- end
26
- end)
18
+ if child then
19
+ resolve(child)
20
+ else
21
+ reject("Timed out")
22
+ end
27
23
  end)
28
24
  end