node-s3tables 0.0.8 → 0.0.9

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -745,16 +745,16 @@ function _encodeValue(raw, transform, out_type) {
745
745
  }
746
746
  }
747
747
  const NaNValue = NaN;
748
- function makeBounds(paritions, spec, schema) {
748
+ function makeBounds(partitions, spec, schema) {
749
749
  return spec.fields.map((f) => {
750
750
  const schemaField = schema.fields.find((sf) => sf.id === f['source-id']);
751
751
  if (!schemaField) {
752
752
  throw new Error(`Schema field not found for source-id ${f['source-id']}`);
753
753
  }
754
- if (!(f.name in paritions)) {
755
- throw new Error(`paritions missing ${f.name}`);
754
+ if (!(f.name in partitions)) {
755
+ throw new Error(`partitions missing ${f.name}`);
756
756
  }
757
- const raw = paritions[f.name];
757
+ const raw = partitions[f.name];
758
758
  if (typeof raw === 'number' && isNaN(raw)) {
759
759
  return NaNValue;
760
760
  }
@@ -1181,8 +1181,7 @@ async function addDataFiles(params) {
1181
1181
  const metadata = await getMetadata(params);
1182
1182
  const bucket = metadata.location.split('/').slice(-1)[0];
1183
1183
  const parent_snapshot_id = BigInt(metadata['current-snapshot-id']);
1184
- const snapshot = metadata.snapshots.find((s) => s['snapshot-id'] === parent_snapshot_id) ??
1185
- null;
1184
+ const snapshot = metadata.snapshots.find((s) => BigInt(s['snapshot-id']) === parent_snapshot_id) ?? null;
1186
1185
  if (!bucket) {
1187
1186
  throw new Error('bad manifest location');
1188
1187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-s3tables",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "node api for dealing with s3tables",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",