You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/15 03:30:27 UTC

[GitHub] [arrow] domoritz commented on a change in pull request #10698: ARROW-13303: [JS] Revise bundles

domoritz commented on a change in pull request #10698:
URL: https://github.com/apache/arrow/pull/10698#discussion_r670105202



##########
File path: js/gulp/package-task.js
##########
@@ -46,14 +46,19 @@ const createMainPackageJson = (target, format) => (orig) => ({
     ...createTypeScriptPackageJson(target, format)(orig),
     bin: orig.bin,
     name: npmPkgName,
-    main: `${mainExport}.node`,
-    browser: `${mainExport}.dom`,
-    module: `${mainExport}.dom.mjs`,
+    type: 'commonjs',
+    main: `${mainExport}.node.js`,

Review comment:
       ```suggestion
       main: `${mainExport}.node`,
   ```

##########
File path: js/gulp/package-task.js
##########
@@ -46,14 +46,19 @@ const createMainPackageJson = (target, format) => (orig) => ({
     ...createTypeScriptPackageJson(target, format)(orig),
     bin: orig.bin,
     name: npmPkgName,
-    main: `${mainExport}.node`,
-    browser: `${mainExport}.dom`,
-    module: `${mainExport}.dom.mjs`,
+    type: 'commonjs',
+    main: `${mainExport}.node.js`,
+    module: `${mainExport}.dom.js`,

Review comment:
       ```suggestion
       module: `${mainExport}.node.js`,
   ```
   
   To be consistent with https://github.com/apache/arrow/pull/10698/files#diff-9ad0361c0b3692cb897f0641d786ade504a91c8c1d6a36c3abd3cf33224946a0R96. 

##########
File path: js/gulp/package-task.js
##########
@@ -46,14 +46,19 @@ const createMainPackageJson = (target, format) => (orig) => ({
     ...createTypeScriptPackageJson(target, format)(orig),
     bin: orig.bin,
     name: npmPkgName,
-    main: `${mainExport}.node`,
-    browser: `${mainExport}.dom`,
-    module: `${mainExport}.dom.mjs`,
+    type: 'commonjs',
+    main: `${mainExport}.node.js`,
+    module: `${mainExport}.dom.js`,
+    browser: `${mainExport}.dom.js`,

Review comment:
       ```suggestion
       browser: `${mainExport}.dom`,
   ```
   
   This way bundlers can pick up mjs files more easily, no?

##########
File path: js/gulp/typescript-task.js
##########
@@ -61,8 +61,8 @@ function compileTypescript(out, tsconfigPath, tsconfigOverrides) {
     return Observable.forkJoin(writeSources, writeDTypes, writeJS);
 }
 
-function cjsMapFile(mapFilePath) { return mapFilePath; }

Review comment:
       Don't we need to undo these changes so we have the correct mapping files?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org