Skip to content

Commit

Permalink
Do not treat break labels as identifiers (#2776)
Browse files Browse the repository at this point in the history
* Do not treat break labels as identifiers

* Update is-reference to npm version
  • Loading branch information
lukastaegert committed Mar 24, 2019
1 parent 61dcba8 commit 75b41e2
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 39 deletions.
79 changes: 45 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -59,7 +59,7 @@
"homepage": "https://github.com/rollup/rollup",
"dependencies": {
"@types/estree": "0.0.39",
"@types/node": "^11.11.5",
"@types/node": "^11.11.6",
"acorn": "^6.1.1"
},
"devDependencies": {
Expand All @@ -74,7 +74,7 @@
"acorn-walk": "^6.1.1",
"ansi-escapes": "^4.0.1",
"buble": "^0.19.7",
"chokidar": "^2.1.2",
"chokidar": "^2.1.5",
"console-group": "^0.3.3",
"date-time": "^3.0.0",
"eslint": "^5.15.3",
Expand All @@ -84,12 +84,12 @@
"hash.js": "^1.1.7",
"husky": "^1.3.1",
"immutable": "^4.0.0-rc.12",
"is-reference": "^1.1.1",
"is-reference": "^1.1.2",
"istanbul": "^0.4.5",
"lint-staged": "^8.1.5",
"locate-character": "^2.0.5",
"magic-string": "^0.25.2",
"markdownlint-cli": "^0.14.0",
"markdownlint-cli": "^0.14.1",
"minimist": "^1.2.0",
"mocha": "^6.0.2",
"prettier": "^1.16.4",
Expand All @@ -106,7 +106,7 @@
"rollup-plugin-replace": "^2.1.1",
"rollup-plugin-string": "^3.0.0",
"rollup-plugin-terser": "^4.0.4",
"rollup-plugin-typescript": "^1.0.0",
"rollup-plugin-typescript": "^1.0.1",
"rollup-pluginutils": "^2.5.0",
"sander": "^0.6.0",
"shx": "^0.3.2",
Expand Down
8 changes: 8 additions & 0 deletions test/function/samples/break-label/_config.js
@@ -0,0 +1,8 @@
const assert = require('assert');

module.exports = {
description: 'do not deconflict break label (#2773)',
exports(exports) {
assert.deepStrictEqual(exports, { value: 'original', n: 1 });
}
};
5 changes: 5 additions & 0 deletions test/function/samples/break-label/main.js
@@ -0,0 +1,5 @@
export { n } from './module_1';
export { value } from './module_2';
import { n } from './module_2';

n();
1 change: 1 addition & 0 deletions test/function/samples/break-label/module_1.js
@@ -0,0 +1 @@
export var n = 1;
8 changes: 8 additions & 0 deletions test/function/samples/break-label/module_2.js
@@ -0,0 +1,8 @@
export let value = 'original';

export function n() {
n: if (value === 1) {
break n;
value = 'changed';
}
}

0 comments on commit 75b41e2

Please sign in to comment.