Skip to content

Conversation

@trxcllnt
Copy link
Contributor

Updates the text-encoding-utf-8 dependency to version 1.0.2, which now supports ESModules in node >= v8.6.0 via the --experimental-modules flag.

We currently support ESModules in node in the main apache-arrow package, but need our dependencies to also expose ESModule forms as well. I have also issued a PR to flatbuffers to add ESModules support, and are using a temporary fork of flatbuffers in my github until that PR is merged.

This PR enables the following workflow:

// file - index.mjs
// run via `node --experimental-modules index.mjs`
import util from 'util';
import * as fs from 'fs';
import { Table } from 'apache-arrow';
(async () => {
  const buffer = await util.promisify(fs.readFile)('simple.arrow');
  console.log(Table.from([buffer]).toString());
/*
 foo,  bar,  baz
   1,    1,   aa
null, null, null
   3, null, null
   4,    4,  bbb
   5,    5, cccc
*/
})();

Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@trxcllnt trxcllnt force-pushed the update-text-encoding-utf8 branch from 4bd2a97 to 7211039 Compare November 20, 2017 23:37
@trxcllnt trxcllnt changed the title [JS]: Update text-encoding-utf-8 dependency with node ESModules support [JS]: Update text-encoding-utf-8 and tslib for node ESModules support Nov 20, 2017
@trxcllnt trxcllnt force-pushed the update-text-encoding-utf8 branch 2 times, most recently from 1e79d21 to ec9aebd Compare November 21, 2017 10:59
@trxcllnt trxcllnt force-pushed the update-text-encoding-utf8 branch from ec9aebd to fbecde5 Compare November 21, 2017 11:14
@wesm wesm changed the title [JS]: Update text-encoding-utf-8 and tslib for node ESModules support ARROW-1841 [JS]: Update text-encoding-utf-8 and tslib for node ESModules support Nov 21, 2017
@wesm wesm changed the title ARROW-1841 [JS]: Update text-encoding-utf-8 and tslib for node ESModules support ARROW-1841: [JS] Update text-encoding-utf-8 and tslib for node ESModules support Nov 21, 2017
@wesm wesm closed this in cac0912 Nov 21, 2017
@trxcllnt trxcllnt deleted the update-text-encoding-utf8 branch November 21, 2017 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants