[ 
https://issues.apache.org/jira/browse/ARROW-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16260854#comment-16260854
 ] 

ASF GitHub Bot commented on ARROW-1841:
---------------------------------------

wesm closed pull request #1338: ARROW-1841: [JS] Update text-encoding-utf-8 and 
tslib for node ESModules support
URL: https://github.com/apache/arrow/pull/1338
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/js/gulp/package-task.js b/js/gulp/package-task.js
index 7b4b15a33..ad56d172e 100644
--- a/js/gulp/package-task.js
+++ b/js/gulp/package-task.js
@@ -49,6 +49,12 @@ const createMainPackageJson = (target, format) => (orig) => 
({
     browser: `${mainExport}.es5.min.js`,
     [`browser:es2015`]: `${mainExport}.es2015.min.js`,
     [`@std/esm`]: { esm: `mjs` },
+    // Temporary workaround until https://github.com/Microsoft/tslib/pull/44 
is merged
+    scripts: {
+        postinstall: `npm i shx && npm run tslib_mjs && npm run tslib_pkg && 
npm r shx`,
+        tslib_mjs: `shx cp $(node -e 
\"console.log(require.resolve('tslib/tslib.es6.js'))\") $(node -e \"var 
r=require,p=r('path');console.log(p.join(p.dirname(r.resolve('tslib')),'tslib.mjs'))\")`,
+        tslib_pkg: `node -e \"var 
r=require,p=r('path'),f=r('fs'),k=p.join(p.dirname(r.resolve('tslib')),'package.json'),x=JSON.parse(f.readFileSync(k));x.main='tslib';f.writeFileSync(k,JSON.stringify(x))\"`
+    }
 });
   
 const createTypeScriptPackageJson = (target, format) => (orig) => ({
diff --git a/js/package.json b/js/package.json
index 24bc27f5b..1a110b2d5 100644
--- a/js/package.json
+++ b/js/package.json
@@ -25,7 +25,8 @@
     "lint": "npm-run-all -p lint:*",
     "lint:src": "tslint --fix --project -p tsconfig.json -c tslint.json 
\"src/**/*.ts\"",
     "lint:test": "tslint --fix --project -p test/tsconfig.json -c tslint.json 
\"test/**/*.ts\"",
-    "prepublishOnly": "echo \"Error: do 'npm run release' instead of 'npm 
publish'\" && exit 1"
+    "prepublishOnly": "echo \"Error: do 'npm run release' instead of 'npm 
publish'\" && exit 1",
+    "postinstall": "shx cp node_modules/tslib/tslib.es6.js 
node_modules/tslib/tslib.mjs"
   },
   "repository": {
     "type": "git",
@@ -54,7 +55,8 @@
   },
   "dependencies": {
     "flatbuffers": "trxcllnt/flatbuffers-esm",
-    "text-encoding": "0.6.4"
+    "text-encoding-utf-8": "^1.0.2",
+    "tslib": "^1.8.0"
   },
   "devDependencies": {
     "@std/esm": "0.13.0",
@@ -90,10 +92,8 @@
     "rxjs": "5.5.2",
     "shx": "0.2.2",
     "source-map-loader": "0.2.3",
-    "text-encoding-utf-8": "1.0.1",
     "trash": "4.1.0",
     "ts-jest": "21.2.1",
-    "tslib": "1.8.0",
     "tslint": "5.8.0",
     "typescript": "2.6.1",
     "uglifyjs-webpack-plugin": "1.0.1",


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [JS] Update text-encoding-utf-8 and tslib for node ESModules support
> --------------------------------------------------------------------
>
>                 Key: ARROW-1841
>                 URL: https://issues.apache.org/jira/browse/ARROW-1841
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: JavaScript
>            Reporter: Wes McKinney
>            Assignee: Paul Taylor
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to