Skip to content

Switch from rollup-stream to rollup#9640

Merged
danez merged 2 commits intobabel:masterfrom
danez:use-real-rollup
Mar 11, 2019
Merged

Switch from rollup-stream to rollup#9640
danez merged 2 commits intobabel:masterfrom
danez:use-real-rollup

Conversation

@danez
Copy link
Member

@danez danez commented Mar 5, 2019

Q                       A
Fixed Issues? no
Patch: Bug Fix? no
Major: Breaking Change? no
Minor: New Feature? no
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? yes updates and rollup
License MIT

This drops rollup-stream, as it does not work with the latest rollup version. Instead use Promises which gulp understands and is the way it is recommended in the rollup docs.

Also updates all related rollup dependencies.

this is the diff in the parser bundle:

--- 	2019-03-05 21:19:47 +0000
+++ 	2019-03-05 21:19:47 +0000
@@ -266,26 +266,26 @@
   types["_" + name] = keywords[name];
 });
 
-const SCOPE_OTHER = 0b000000000;
-const SCOPE_PROGRAM = 0b000000001;
-const SCOPE_FUNCTION = 0b000000010;
-const SCOPE_ASYNC = 0b000000100;
-const SCOPE_GENERATOR = 0b000001000;
-const SCOPE_ARROW = 0b000010000;
-const SCOPE_SIMPLE_CATCH = 0b000100000;
-const SCOPE_SUPER = 0b001000000;
-const SCOPE_DIRECT_SUPER = 0b010000000;
-const SCOPE_CLASS = 0b100000000;
-const SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION;
+const SCOPE_OTHER = 0b000000000,
+      SCOPE_PROGRAM = 0b000000001,
+      SCOPE_FUNCTION = 0b000000010,
+      SCOPE_ASYNC = 0b000000100,
+      SCOPE_GENERATOR = 0b000001000,
+      SCOPE_ARROW = 0b000010000,
+      SCOPE_SIMPLE_CATCH = 0b000100000,
+      SCOPE_SUPER = 0b001000000,
+      SCOPE_DIRECT_SUPER = 0b010000000,
+      SCOPE_CLASS = 0b100000000,
+      SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION;
 function functionFlags(isAsync, isGenerator) {
   return SCOPE_FUNCTION | (isAsync ? SCOPE_ASYNC : 0) | (isGenerator ? SCOPE_GENERATOR : 0);
 }
-const BIND_NONE = 0;
-const BIND_VAR = 1;
-const BIND_LEXICAL = 2;
-const BIND_FUNCTION = 3;
-const BIND_SIMPLE_CATCH = 4;
-const BIND_OUTSIDE = 5;
+const BIND_NONE = 0,
+      BIND_VAR = 1,
+      BIND_LEXICAL = 2,
+      BIND_FUNCTION = 3,
+      BIND_SIMPLE_CATCH = 4,
+      BIND_OUTSIDE = 5;
 
 function isSimpleProperty(node) {
   return node != null && node.type === "Property" && node.kind === "init" && node.method === false;
@@ -3958,7 +3958,6 @@
 var _isDigit = function isDigit(code) {
   return code >= 48 && code <= 57;
 };
-
 const VALID_REGEX_FLAGS = new Set(["g", "m", "s", "i", "y", "u"]);
 const forbiddenNumericSeparatorSiblings = {
   decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
@@ -7201,14 +7200,14 @@
 const empty = [];
 const loopLabel = {
   kind: "loop"
-};
-const switchLabel = {
+},
+      switchLabel = {
   kind: "switch"
 };
-const FUNC_NO_FLAGS = 0b000;
-const FUNC_STATEMENT = 0b001;
-const FUNC_HANGING_STATEMENT = 0b010;
-const FUNC_NULLABLE_ID = 0b100;
+const FUNC_NO_FLAGS = 0b000,
+      FUNC_STATEMENT = 0b001,
+      FUNC_HANGING_STATEMENT = 0b010,
+      FUNC_NULLABLE_ID = 0b100;
 class StatementParser extends ExpressionParser {
   parseTopLevel(file, program) {
     program.sourceType = this.options.sourceType;
@@ -9516,14 +9515,14 @@
     let type = parseConstituentType();
 
     if (this.match(operator)) {
-      const types$$1 = [type];
+      const types = [type];
 
       while (this.eat(operator)) {
-        types$$1.push(parseConstituentType());
+        types.push(parseConstituentType());
       }
 
       const node = this.startNodeAtNode(type);
-      node.types = types$$1;
+      node.types = types;
       type = this.finishNode(node, kind);
     }
 
@@ -11053,6 +11052,7 @@
 
   return parser.getExpression();
 }
+
 function getParser(options, input) {
   let cls = Parser;

@danez danez added PR: Internal 🏠 A type of pull request used for our changelog categories pkg: parser labels Mar 5, 2019
@babel-bot
Copy link
Collaborator

babel-bot commented Mar 5, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10447/

@buildsize
Copy link

buildsize bot commented Mar 6, 2019

File name Previous Size New Size Change
babel-preset-env.js [new file] 2.04 MB
babel-preset-env.min.js [new file] 1.09 MB
babel.js [new file] 2.76 MB
babel.min.js [new file] 1.54 MB

@nicolo-ribaudo
Copy link
Member

@BuildSize doesn't seem to be working well

@danez
Copy link
Member Author

danez commented Mar 6, 2019

Yeah, not sure what happened.

@danez danez merged commit ec318d0 into babel:master Mar 11, 2019
@danez danez deleted the use-real-rollup branch March 11, 2019 07:42
mAAdhaTTah added a commit to mAAdhaTTah/babel that referenced this pull request Mar 15, 2019
* master: (58 commits)
  Remove dependency on home-or-tmp package (babel#9678)
  [proposal-object-rest-spread] fix templateLiteral in extractNormalizedKeys (babel#9628)
  Partial application plugin (babel#9474)
  Private Static Class Methods (Stage 3) (babel#9446)
  gulp-uglify@3.0.2
  rollup@1.6.0
  eslint@5.15.1
  jest@24.5.0
  regexpu-core@4.5.4
  Remove input and length from state (babel#9646)
  Switch from rollup-stream to rollup and update deps (babel#9640)
  System modules - Hoist classes like other variables (babel#9639)
  fix: Don't transpile ES2018 symbol properties (babel#9650)
  Add WarningsToErrorsPlugin to webpack to avoid missing build problems on CI (babel#9647)
  Update regexpu-core dependency (babel#9642)
  Add placeholders support to @babel/types and @babel/generator (babel#9542)
  Generate plugins file
  Make babel-standalone an ESModule and enable flow (babel#9025)
  Reorganize token types and use a map for them (babel#9645)
  [TS] Allow context type annotation on getters/setters (babel#9641)
  ...
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Internal 🏠 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants