Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant space for export js dump #6560

Merged
merged 3 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#### :nail_care: Polish

- Make the `--help` arg be prioritized in the CLI, so correctly prints help message and skip other commands. https://github.com/rescript-lang/rescript-compiler/pull/6667
- Remove redundant space for export in generated js code. https://github.com/rescript-lang/rescript-compiler/pull/6560

# 11.1.0

Expand Down
2 changes: 1 addition & 1 deletion jscomp/core/js_dump_import_export.ml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ let es6_export cxt f (idents : Ident.t list) =
(fun (s, export) ->
P.group f 0 (fun _ ->
P.string f export;
P.space f;
if not @@ Ext_string.equal export s then (
P.space f;
P.string f L.as_;
P.space f;
P.string f s);
Expand Down
4 changes: 2 additions & 2 deletions jscomp/test/ImportAttributes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var buttonCss = MyCssCss.button;
console.log(buttonCss);

export {
myJson ,
buttonCss ,
myJson,
buttonCss,
}
/* myJson Not a pure module */
9 changes: 8 additions & 1 deletion jscomp/test/build.ninja

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions lib/es6/arg.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,17 +701,17 @@ function align(limitOpt, speclist) {
}

export {
parse ,
parse_dynamic ,
parse_argv ,
parse_argv_dynamic ,
parse_and_expand_argv_dynamic ,
parse_expand ,
Help ,
Bad ,
usage ,
usage_string ,
align ,
current ,
parse,
parse_dynamic,
parse_argv,
parse_argv_dynamic,
parse_and_expand_argv_dynamic,
parse_expand,
Help,
Bad,
usage,
usage_string,
align,
current,
}
/* No side effect */
56 changes: 28 additions & 28 deletions lib/es6/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,33 +479,33 @@ var concat = Caml_array.concat;
var fast_sort = stable_sort;

export {
make_float ,
init ,
make_matrix ,
create_matrix ,
append ,
concat ,
sub ,
copy ,
fill ,
blit ,
to_list ,
of_list ,
iter ,
iteri ,
map ,
mapi ,
fold_left ,
fold_right ,
iter2 ,
map2 ,
for_all ,
exists ,
mem ,
memq ,
sort ,
stable_sort ,
fast_sort ,
Floatarray ,
make_float,
init,
make_matrix,
create_matrix,
append,
concat,
sub,
copy,
fill,
blit,
to_list,
of_list,
iter,
iteri,
map,
mapi,
fold_left,
fold_right,
iter2,
map2,
for_all,
exists,
mem,
memq,
sort,
stable_sort,
fast_sort,
Floatarray,
}
/* No side effect */
56 changes: 28 additions & 28 deletions lib/es6/arrayLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,33 +479,33 @@ var concat = Caml_array.concat;
var fast_sort = stable_sort;

export {
init ,
make_matrix ,
create_matrix ,
append ,
concat ,
sub ,
copy ,
fill ,
blit ,
to_list ,
of_list ,
iter ,
map ,
iteri ,
mapi ,
fold_left ,
fold_right ,
iter2 ,
map2 ,
exists ,
for_all ,
mem ,
memq ,
make_float ,
sort ,
stable_sort ,
fast_sort ,
Floatarray ,
init,
make_matrix,
create_matrix,
append,
concat,
sub,
copy,
fill,
blit,
to_list,
of_list,
iter,
map,
iteri,
mapi,
fold_left,
fold_right,
iter2,
map2,
exists,
for_all,
mem,
memq,
make_float,
sort,
stable_sort,
fast_sort,
Floatarray,
}
/* No side effect */
34 changes: 17 additions & 17 deletions lib/es6/belt.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ var Int;
var Float;

export {
Id ,
$$Array ,
SortArray ,
MutableQueue ,
MutableStack ,
List ,
$$Range ,
$$Set ,
$$Map ,
MutableSet ,
MutableMap ,
HashSet ,
HashMap ,
$$Option ,
Result ,
Int ,
Float ,
Id,
$$Array,
SortArray,
MutableQueue,
MutableStack,
List,
$$Range,
$$Set,
$$Map,
MutableSet,
MutableMap,
HashSet,
HashMap,
$$Option,
Result,
Int,
Float,
}
/* No side effect */
144 changes: 72 additions & 72 deletions lib/es6/belt_Array.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,77 +688,77 @@ function init(n, f) {
}

export {
get ,
getExn ,
set ,
setExn ,
shuffleInPlace ,
shuffle ,
reverseInPlace ,
reverse ,
make ,
range ,
rangeBy ,
makeByU ,
makeBy ,
makeByAndShuffleU ,
makeByAndShuffle ,
zip ,
zipByU ,
zipBy ,
unzip ,
concat ,
concatMany ,
slice ,
sliceToEnd ,
fill ,
blit ,
blitUnsafe ,
forEachU ,
forEach ,
mapU ,
map ,
flatMapU ,
flatMap ,
getByU ,
getBy ,
getIndexByU ,
getIndexBy ,
keepU ,
keep ,
keepWithIndexU ,
keepWithIndex ,
keepMapU ,
keepMap ,
forEachWithIndexU ,
forEachWithIndex ,
mapWithIndexU ,
mapWithIndex ,
partitionU ,
partition ,
reduceU ,
reduce ,
reduceReverseU ,
reduceReverse ,
reduceReverse2U ,
reduceReverse2 ,
reduceWithIndexU ,
reduceWithIndex ,
joinWithU ,
joinWith ,
someU ,
some ,
everyU ,
every ,
every2U ,
every2 ,
some2U ,
some2 ,
cmpU ,
cmp ,
eqU ,
eq ,
initU ,
init ,
get,
getExn,
set,
setExn,
shuffleInPlace,
shuffle,
reverseInPlace,
reverse,
make,
range,
rangeBy,
makeByU,
makeBy,
makeByAndShuffleU,
makeByAndShuffle,
zip,
zipByU,
zipBy,
unzip,
concat,
concatMany,
slice,
sliceToEnd,
fill,
blit,
blitUnsafe,
forEachU,
forEach,
mapU,
map,
flatMapU,
flatMap,
getByU,
getBy,
getIndexByU,
getIndexBy,
keepU,
keep,
keepWithIndexU,
keepWithIndex,
keepMapU,
keepMap,
forEachWithIndexU,
forEachWithIndex,
mapWithIndexU,
mapWithIndex,
partitionU,
partition,
reduceU,
reduce,
reduceReverseU,
reduceReverse,
reduceReverse2U,
reduceReverse2,
reduceWithIndexU,
reduceWithIndex,
joinWithU,
joinWith,
someU,
some,
everyU,
every,
every2U,
every2,
some2U,
some2,
cmpU,
cmp,
eqU,
eq,
initU,
init,
}
/* No side effect */
2 changes: 1 addition & 1 deletion lib/es6/belt_Float.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ function fromString(i) {
}

export {
fromString ,
fromString,
}
/* No side effect */
Loading
Loading