@rip-lang/swarm 1.2.11 → 1.2.13
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/package.json +2 -2
- package/swarm.rip +6 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rip-lang/swarm",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.13",
|
|
4
4
|
"description": "Parallel job runner with worker threads — setup once, swarm many",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "swarm.rip",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"author": "Steve Shreeve <steve.shreeve@gmail.com>",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"rip-lang": "^3.13.
|
|
38
|
+
"rip-lang": "^3.13.7"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"swarm.rip",
|
package/swarm.rip
CHANGED
|
@@ -199,15 +199,14 @@ export swarm = (opts = {}) ->
|
|
|
199
199
|
jobs = tasks.length
|
|
200
200
|
|
|
201
201
|
# resolve paths
|
|
202
|
-
|
|
202
|
+
swarmDir = dirname(new URL(import.meta.url).pathname)
|
|
203
|
+
workerPath = join(swarmDir, 'lib', 'worker.mjs')
|
|
203
204
|
scriptPath = resolve(process.argv[1] or '')
|
|
204
205
|
|
|
205
|
-
# find rip-loader for workers
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
catch
|
|
210
|
-
null
|
|
206
|
+
# find rip-loader for workers — derive from swarm's own location
|
|
207
|
+
# (swarm is at node_modules/@rip-lang/swarm/, loader is at node_modules/rip-lang/)
|
|
208
|
+
loaderPath = join(swarmDir, '..', '..', 'rip-lang', 'rip-loader.js')
|
|
209
|
+
loaderPath = null unless existsSync(loaderPath)
|
|
211
210
|
|
|
212
211
|
# state
|
|
213
212
|
live = 0
|