You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.9 KiB

4 years ago
  1. ### Version 0.4.0 (2015-11-12) ###
  2. - Changed: sourceMappingURL comments used to be matched only when placed at
  3. the end of the script. However, since several commonly used JavaScript
  4. libraries do not follow this convention and all popular web browsers accept
  5. non-trailing comments, this has been revised.
  6. So now non-trailing SourceMappingURL comments are matched as well.
  7. ### Version 0.3.0 (2014-08-16) ###
  8. - Changed: sourceMappingURL comments used to be matched only if they appeared
  9. on their own line. However, the spec only says:
  10. > The generated code may include a line at the end of the source, with the following form:
  11. >
  12. > //# sourceMappingURL=<url>
  13. So now they are matched also when they appear on the same line as code.
  14. - Removed: The `.set()` method. I couldn’t decide how it should work
  15. considering the above change. Moreover, it was unnecessarily complex (and
  16. would have gotten worse) for very little gain. It is much easier to run
  17. `.remove()` if needed, and then simply `code += "\n//# sourceMappingURL=" +
  18. url` (using the appropriate comment syntax and newline). KISS.
  19. - Changed: The `.insertBefore()` method now always inserts the string exactly
  20. before the sourceMappingURL comment; not before the newline before the
  21. comment (if any). Moreover, it does not ensure that the comment will be on a
  22. new line anymore. This is up to the caller. KISS.
  23. - Changed: The `.remove()` method no longer removes the newline before the
  24. sourceMappingURL (if any).
  25. - Changed: Renamed `.get()` to `.getFrom()`.
  26. - Changed: Renamed `.remove()` to `.removeFrom()`.
  27. - Added: The `.existsIn()` method.
  28. ### Version 0.2.0 (2014-02-23) ###
  29. - Changed: A space is no longer inserted before the closing comment syntax. If
  30. such a space is desired, it needs to be put in the closing comment syntax
  31. itself (such as `["/*", " */"]` instead of `["/*", "*/"]`). (Backwards
  32. incompatible change.)
  33. ### Version 0.1.0 (2014-02-22) ###
  34. - Initial release.