synthetic-factorio 0.2.4 → 0.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/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { FactorioEngine, FactorioEngineOptions } from './FactorioEngine.ts';
2
2
  export { ModManager, ModManagerOptions, ModDownloadOptions, ModInstallOptions, ModPortalDownloadOptions } from './ModManager.ts';
3
3
  export { tableToArray } from './utils.ts';
4
+ export { defines } from './defines.ts';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { FactorioEngine } from "./FactorioEngine.js";
2
2
  export { ModManager } from "./ModManager.js";
3
3
  export { tableToArray } from "./utils.js";
4
+ export { defines } from "./defines.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthetic-factorio",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "description": "Synthetic Factorio runtime for unit testing",
5
5
  "license": "ISC",
6
6
  "author": "Spencer Guest",
@@ -9,7 +9,8 @@
9
9
  "scripts": {
10
10
  "test": "vitest",
11
11
  "test:ci": "vitest run",
12
- "build": "tsc"
12
+ "build": "tsc",
13
+ "generate-defines": "node scripts/generate-defines.ts"
13
14
  },
14
15
  "files": [
15
16
  "dist/**/*.js",
@@ -7,6 +7,10 @@ data = data or {}
7
7
  data.raw = data.raw or {}
8
8
 
9
9
  function data.extend(self, values)
10
+ -- Handle calling data.extend instead of data:extend
11
+ if(values == nil) then
12
+ values = self
13
+ end
10
14
  for i, value in ipairs(values) do
11
15
  -- space-age tries to extend on the string "./data/__space-age__/sound/ambient/space/interlude-6/interlude-6.lua"
12
16
  -- (i.e. not a valid prototype object, just that string) so we need to gracefully handle invalid objects