@certik/skynet 0.22.0 → 0.22.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/dist/util.js CHANGED
@@ -1,72 +1,26 @@
1
- // @bun
2
- var __create = Object.create;
3
- var __getProtoOf = Object.getPrototypeOf;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __toESM = (mod, isNodeMode, target) => {
9
- target = mod != null ? __create(__getProtoOf(mod)) : {};
10
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
11
- for (let key of __getOwnPropNames(mod))
12
- if (!__hasOwnProp.call(to, key))
13
- __defProp(to, key, {
14
- get: () => mod[key],
15
- enumerable: true
16
- });
17
- return to;
18
- };
19
- var __moduleCache = /* @__PURE__ */ new WeakMap;
20
- var __toCommonJS = (from) => {
21
- var entry = __moduleCache.get(from), desc;
22
- if (entry)
23
- return entry;
24
- entry = __defProp({}, "__esModule", { value: true });
25
- if (from && typeof from === "object" || typeof from === "function")
26
- __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
27
- get: () => from[key],
28
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
29
- }));
30
- __moduleCache.set(from, entry);
31
- return entry;
32
- };
33
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
34
- var __export = (target, all) => {
35
- for (var name in all)
36
- __defProp(target, name, {
37
- get: all[name],
38
- enumerable: true,
39
- configurable: true,
40
- set: (newValue) => all[name] = () => newValue
41
- });
42
- };
43
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
44
- var __require = import.meta.require;
45
-
46
- // util.ts
1
+ // Inclusive range
47
2
  function range(startAt, endAt, step) {
48
- const arr = [];
49
- for (let i = startAt;i <= endAt; i += step) {
50
- arr.push([i, Math.min(endAt, i + step - 1)]);
51
- }
52
- return arr;
3
+ const arr = [];
4
+ for (let i = startAt; i <= endAt; i += step) {
5
+ arr.push([i, Math.min(endAt, i + step - 1)]);
6
+ }
7
+ return arr;
53
8
  }
54
9
  function arrayGroup(array, groupSize) {
55
- const groups = [];
56
- for (let i = 0;i < array.length; i += groupSize) {
57
- groups.push(array.slice(i, i + groupSize));
58
- }
59
- return groups;
10
+ const groups = [];
11
+ for (let i = 0; i < array.length; i += groupSize) {
12
+ groups.push(array.slice(i, i + groupSize));
13
+ }
14
+ return groups;
60
15
  }
16
+ // return an array with numbers of given inclusive range
17
+ // given 1, 5
18
+ // return [1, 2, 3, 4, 5]
61
19
  function fillRange(start, end) {
62
- const result = [];
63
- for (let i = start;i <= end; i++) {
64
- result.push(i);
65
- }
66
- return result;
20
+ const result = [];
21
+ for (let i = start; i <= end; i++) {
22
+ result.push(i);
23
+ }
24
+ return result;
67
25
  }
68
- export {
69
- range,
70
- fillRange,
71
- arrayGroup
72
- };
26
+ export { arrayGroup, range, fillRange };
package/examples/api.ts CHANGED
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "description": "Skynet Shared JS library",
5
5
  "type": "module",
6
6
  "exports": {
@@ -99,7 +99,7 @@
99
99
  },
100
100
  "author": "CertiK Engineering",
101
101
  "scripts": {
102
- "build": "bun build --outdir dist --target bun --format esm *.ts && tsc --project tsconfig.build.json --emitDeclarationOnly",
102
+ "build": "tsc --project tsconfig.build.json",
103
103
  "clean": "rimraf dist",
104
104
  "lint": "eslint '*.ts' test/*.ts",
105
105
  "test": "doppler run -- bun test",
@@ -150,4 +150,4 @@
150
150
  "patchedDependencies": {
151
151
  "@databricks/sql@1.9.0": "patches/@databricks%2Fsql@1.9.0.patch"
152
152
  }
153
- }
153
+ }
@@ -2,7 +2,6 @@
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "noEmit": false,
5
- "emitDeclarationOnly": true,
6
5
  "outDir": "dist",
7
6
  "declaration": true,
8
7
  "declarationMap": true,
@@ -1,5 +0,0 @@
1
- {
2
- "conventionalCommits.scopes": [
3
- "lib-skynet"
4
- ]
5
- }
package/bun.lockb DELETED
Binary file