Logan Smyth
ca8556e36f
Let function optimize better by using a boolean.
2016-04-19 19:36:11 -07:00
Logan Smyth
eb455dff85
Pre-expand type aliases for fast lookup.
2016-04-19 19:36:10 -07:00
Logan Smyth
dc92a16e7f
Fast path for newline processing.
2016-04-19 18:59:32 -07:00
Logan Smyth
e7796b45c9
Add a fast path for checking for exact node types.
...
In my unscientific tests locally, this look the time for generating
200 files down from 11.8 to 8.3 seconds.
2016-04-19 18:59:15 -07:00
Logan Smyth
e7d37f342c
Merge pull request #3457 from babel/T7272
...
Add test for T7272
2016-04-18 23:35:49 -07:00
Logan Smyth
b311517fd3
Merge pull request #3422 from loganfsmyth/this-shadow-constructor
...
Initialize shadowed 'this' bindings in constructors after super - fixes T7191
2016-04-16 14:29:38 -07:00
Henry Zhu
ceaf4af714
Docs: add heading for writing tests [skip ci]
2016-04-16 14:48:11 -04:00
Henry Zhu
eb184d618b
Clarify phabricator explaination [ci skip]
2016-04-16 14:03:57 -04:00
Henry Zhu
178fc539da
Add a note about old github issue links
2016-04-14 08:03:46 -04:00
Henry Zhu
98685d21d7
Merge pull request #3464 from lydell/code-frame-tabs
...
babel-code-frame: Handle code with tabs
2016-04-11 13:42:37 -04:00
Simon Lydell
f80463120b
babel-code-frame: Handle code with tabs
...
Previously, the `^` marker was misaligned if the line above contained tabs.
Fixes T7282.
Note: This commit handles a very subtle edge-case differently: When the passed
in column number is larger than the length of the line. Previously, the `^`
marker would be faithfully placed at that exact column number. Now, it is placed
at the end of the line instead (after the last character of the line to be
precise). Ideally, we should define what should happen in edge cases, but that's
out of scope for this PR.
2016-04-11 15:46:32 +02:00
Simon Lydell
580b09abb1
babel-code-frame: Add test for code with tabs
2016-04-11 15:44:31 +02:00
Logan Smyth
81e6d4147d
Map the end of block statement nodes to the end of their original location - fixes T7258
2016-04-11 01:54:41 -07:00
Logan Smyth
76bb1dffaa
Track sourcemap location on a stack - fixes T7255
2016-04-11 01:54:40 -07:00
Logan Smyth
7d6d4c204b
Create a duplicate class identiier to avoid sharing 'loc'.
2016-04-10 21:18:33 -07:00
Logan Smyth
3cb9c90c31
Merge pull request #3459 from loganfsmyth/changelog-6.7.6
...
Update changelog for v6.7.6.
2016-04-08 09:31:35 -07:00
Logan Smyth
83301afb6e
Update changelog for v6.7.6.
2016-04-08 09:30:44 -07:00
Logan Smyth
0130c6c186
v6.7.6
2016-04-08 09:27:12 -07:00
Logan Smyth
003e39c2a8
Merge pull request #3458 from loganfsmyth/revert-3433
...
Revert "Merge pull request #3433 from loganfsmyth/bail-out-rename"
2016-04-08 09:23:58 -07:00
Logan Smyth
c3ccddaaaf
Revert "Merge pull request #3433 from loganfsmyth/bail-out-rename"
...
This reverts commit 2d0a007d14e519fe60a849dd17068a0f3df79a28, reversing
changes made to e4d6d420415a0c290a321fb6c18ba5f19675b5c1.
2016-04-08 09:09:48 -07:00
Henry Zhu
c24b0b043a
Add test for T7272
2016-04-08 09:02:02 -04:00
Logan Smyth
b0d27142e8
Merge pull request #3455 from loganfsmyth/changelog-6.7.5
...
Update CHANGELOG for v6.7.5
2016-04-07 20:29:07 -07:00
Logan Smyth
89ecbda25c
v6.7.5
2016-04-07 20:24:49 -07:00
Logan Smyth
bd06ce3678
Update CHANGELOG for v6.7.5
2016-04-07 20:09:57 -07:00
Logan Smyth
9cfb8cb172
Merge pull request #3451 from loganfsmyth/sourcemap-no-source
...
Handle input source mappings with no original location.
2016-04-07 20:06:11 -07:00
Logan Smyth
3af8ec16e9
Handle input source mappings with no source location - fixes T7151
2016-04-07 09:34:45 -07:00
Logan Smyth
d221e21102
Handle mappings with no source when using CLI file.
2016-04-07 09:34:43 -07:00
Logan Smyth
6ec9bbead4
Merge pull request #3421 from loganfsmyth/generate-default-exports
...
Wrap parens around default exports starting with function/class - fixes T7136
2016-04-06 22:02:52 -07:00
Logan Smyth
11e2e1b9b0
Merge pull request #3258 from trodrigues/patch-1
...
Documentation for babel-plugin-transform-runtime
2016-04-06 20:54:42 -07:00
Logan Smyth
2d0a007d14
Merge pull request #3433 from loganfsmyth/bail-out-rename
...
Only attempt to rename export declarations, not expressions - fixes T7215
2016-04-06 19:04:21 -07:00
Logan Smyth
e4d6d42041
Merge pull request #3447 from nkzawa/patch-0
...
Stop traversing when target type is found
2016-04-06 18:31:51 -07:00
Logan Smyth
4b4ffe587a
Merge pull request #3448 from addaleax/pass-strings-to-path-xyzname
...
Make sure input to path.{dir,base}name is a string
2016-04-06 17:21:34 -07:00
Anna Henningsen
bd99179abc
Make sure input to path.{dir,base}name is a string
...
Since nodejs/node@08085c49b6 , which will be part of Node.js v6.0,
functions from the `path` core module (like `dirname`) will require
their input to be a string.
Currently, at some points in the code they might be called
with `undefined`; This patch adds `… || ""` so that the input
is always a string.
For `path.dirname` in the babel-core file, this does not change
behaviour, since
`path.dirname(undefined) === path.dirname("") === "."` (where the
first expression is only defined for Node.js ≤ v5.x).
For `path.basename`, this changes the return value, since
`path.basename(undefined) === "undefined"` (on Node.js ≤ v5.x), but
`path.basename("") === ""`. However, it seems reasonable to assume
that, due to the trailing expression in
`path.basename(…) || "stdout"`, the current behaviour is not actually
the intended one.
There are possibly more places in the code base where similar changes
may be neccessary; However, these suffice to make the tests pass
and un-break the build of at least one external project when using
the current Node.js master branch.
2016-03-28 15:31:38 +02:00
nkzawa
85ecb6c97b
stop traversing when target type is found
2016-03-28 03:01:06 +09:00
Henry Zhu
8fb6f878a3
Merge pull request #3441 from lydell/improve-babel-code-frame
...
Improve babel-code-frame. Kill the line-numbers dependency.
2016-03-25 13:06:00 -04:00
Henry Zhu
fd06f72c95
Merge pull request #3442 from loganfsmyth/remove-stale-check
...
Remove the NodePath validation check
2016-03-25 13:05:19 -04:00
Henry Zhu
e4be235e67
Merge pull request #3444 from drd/dont-mangle-jsxexpressioncontainer-stringliterals
...
Preserve whitespace in JSXExpressionContainer StringLiteral children
2016-03-25 13:04:10 -04:00
Eric O'Connell
aef82d190b
Preserve whitespace in JSXExpressionContainer StringLiteral children - fixes T7243
2016-03-24 21:17:09 -07:00
Logan Smyth
bad2c768f2
Remove this check which will never pass with the new cache.
2016-03-23 20:57:18 -07:00
Simon Lydell
b733c6766a
babel-code-frame: Add missing documentation.
...
I used the README for babel-generator as inspiration.
2016-03-23 19:06:45 +01:00
Simon Lydell
dceb988bbb
babel-code-frame: Fix indentation
2016-03-23 19:00:53 +01:00
Simon Lydell
aaaffd32e7
babel-code-frame: Get rid of the line-numbers dependency.
2016-03-23 18:59:39 +01:00
Simon Lydell
d6b8e4c608
babel-code-frame: Add tests
2016-03-23 18:38:07 +01:00
Simon Lydell
6af4ba1937
babel-code-frame: Update type annotation
...
The code allows omitting the column number, but the type annotation for that
parameter didn't.
2016-03-23 17:13:07 +01:00
Henry Zhu
4c371132ae
Merge pull request #3439 from loganfsmyth/changelog-6.7.4
...
Update CHANGELOG for 6.7.4
2016-03-22 23:48:42 -04:00
Logan Smyth
66a77fe9c1
Update CHANGELOG for 6.7.4
2016-03-22 20:44:05 -07:00
Logan Smyth
6470426f7a
v6.7.4
2016-03-22 20:37:46 -07:00
Amjad Masad
a42d57ea81
Merge pull request #3430 from babel/dont-reuse-react
...
Don't reuse same node for React.createElement
2016-03-22 17:14:53 -07:00
Sebastian McKenzie
67de615bfc
update babel-code-frame version
2016-03-22 22:14:36 +00:00
Sebastian McKenzie
09287643c7
remove line-numbers from babel-code-frame
2016-03-22 22:08:25 +00:00