Skip to content

Commit b8bfe4f

Browse files
authored
Merge pull request #28 from fink-lang/fix-pkg
fix(pkg): add missing files to pkg
2 parents d526932 + 0c5e6e6 commit b8bfe4f

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ rules:
258258
rest-spread-spacing:
259259
- error
260260
- never
261-
semi: 'off'
261+
semi: 'error'
262262
semi-spacing:
263263
- error
264264
- after: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"clean": "rimraf ./build",
2929
"build": "run build:*",
3030
"build:dir": "mkdir -p ./build/pkg",
31-
"build:esm": "cp src/runtime.js src/globals.js src/nullish.js src/reflect.js src/this.js src/errors.js ./build/pkg/",
31+
"build:esm": "babel --out-dir build/pkg/ ./src/*.js",
3232
"build:cjs": "babel --config-file ./babel.build-cjs.config.js --out-dir build/pkg/cjs ./src/*.js",
3333
"build:pkg-cjs": "cp ./package-cjs.json build/pkg/cjs/package.json",
3434
"build:files": "cp ./package.json ./README.md ./LICENSE ./build/pkg/",

src/hamt.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const INDEX = 3;
2121
const ARRAY = 4;
2222

2323

24-
const is_del_op = (op)=> typeof op === 'undefined'
24+
const is_del_op = (op)=> typeof op === 'undefined';
2525

2626

2727
const pop_count = (x)=> {
@@ -189,7 +189,7 @@ const update_collision_list = (hash, list, op, key, size)=> {
189189

190190
if (child.key === key) {
191191
if (is_del_op(op)) {
192-
--size.value
192+
--size.value;
193193
return array_del(list, idx);
194194
}
195195

@@ -381,7 +381,7 @@ const modify_node = (node, shift, op, h, k, size)=> {
381381

382382
} // else if (type === COLLISION) {
383383
return modify_collision_node(node, shift, op, h, k, size);
384-
}
384+
};
385385

386386

387387
const get_from_collision = (node, hash, key, fallback)=> {
@@ -418,7 +418,7 @@ export const get = (map, key, alt)=> {
418418
: alt;
419419

420420
case COLLISION:
421-
return get_from_collision(node, hash, key, alt)
421+
return get_from_collision(node, hash, key, alt);
422422

423423
case INDEX: {
424424
const frag = hash_fragment(shift, hash);
@@ -451,7 +451,7 @@ export const get = (map, key, alt)=> {
451451

452452

453453
export const update = (map, key, op)=> {
454-
const hash = gen_hash(key)
454+
const hash = gen_hash(key);
455455
const size = {value: map.size};
456456
const {root} = map;
457457

@@ -461,7 +461,7 @@ export const update = (map, key, op)=> {
461461

462462
return new_root === root
463463
? map
464-
: {root: new_root, size: size.value}
464+
: {root: new_root, size: size.value};
465465
};
466466

467467

@@ -481,6 +481,6 @@ export const del = (map, key)=> (
481481
);
482482

483483

484-
export const empty = {root: undefined, size: 0}
484+
export const empty = {root: undefined, size: 0};
485485

486486

src/runtime.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Iterator {
88
return;
99
}
1010
yield value;
11-
it = next_it
11+
it = next_it;
1212
}
1313
}
1414
}
@@ -206,7 +206,7 @@ export const _iter_ = (iterable)=> {
206206
}
207207
// TODO: make numbers iterable?
208208
return _empty_iter_;
209-
}
209+
};
210210

211211

212212

@@ -261,4 +261,3 @@ export const _join_ = (sep)=> (iterable)=> {
261261
// TODO: inspect type to optimize for Arrays, Strings, etc
262262
return [...iterable].join(sep);
263263
};
264-

src/this.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
export const with_this = (fn)=> function with_this(...args) {
33
// eslint-disable-next-line no-invalid-this
44
return fn(this, ...args);
5-
}
5+
};

0 commit comments

Comments
 (0)