202 Commits

Author SHA1 Message Date
ezolenko
5f02a91820 - fix for windows path and build 2020-10-02 09:26:52 -06:00
ezolenko
ee33209beb Merge branch 'fix-declaration-map-sources' of https://github.com/agilgur5/rollup-plugin-typescript2 into agilgur5-fix-declaration-map-sources_2 2020-10-02 09:26:24 -06:00
Anton Gilgur
ec0568ba2c (fix): declaration maps should have correct sources
- previously, declarationDir was set to cwd if useTsconfigDeclarationDir
  wasn't true, however, declarations aren't output to cwd, but to
  Rollup's output destination, so this was incorrect
  - instead, don't set declarationDir, which defaults it to outDir,
    which is currently set to a placeholder
    - previously, it rewrote declarations to output to Rollup's dest
      from cwd, now rewrite from outDir placeholder instead
  - and add a rewrite of sources to match relative path from Rollup's
    output dest instead of outDir placeholder

- also change the one line in the docs that says it'll be
  `process.cwd()`; every other reference says it'll be the output dest
2020-09-30 19:46:37 -04:00
ezolenko
2cace3fd80 - updating dependencies 2020-09-25 13:43:38 -06:00
Javier Gonzalez
c183d33023
stop roll() from failing if the new cache folder is not created (#243)
* stop roll() from failing if the new cache has no files

Today I stumbled upon an error where it would fail when the cache folder was not present
```(typescript) Error: ENOENT: no such file or directory, rename 'REDACTED\node_modules\.cache\rollup-plugin-typescript2/rpt2_759e2fd8d3f20c1a0805faf5404af6bea36632fd/code/cache_' -> 'REDACTED\node_modules\.cache\rollup-plugin-typescript2/rpt2_759e2fd8d3f20c1a0805faf5404af6bea36632fd/code/cache'```

This PR fixes it by checking its existence before trying to rename it

* use existsSync instead of fs.existsSync

* use renameSync instead of fs.renameSync
2020-09-25 13:00:03 -06:00
Anton Gilgur
9e308c19b0
(refactor): use Rollup's Plugin interface instead of manual types (#222)
- more importantly, using Plugin ensures that the types are accurate
2020-03-31 11:39:41 -06:00
ezolenko
034abe0a83 - updating dependencies 2020-03-26 23:45:45 -06:00
Tiger Oakes
c6c733fcb5 Use imports with @rollup/pluginutils 2020-03-26 11:07:35 -07:00
Eugene Zolenko
67748cc7cd - fix for plugin option type 2020-03-10 10:43:17 -06:00
Eugene Zolenko
b7c7389dcd - exporting IOptions type 2020-03-03 17:08:53 -07:00
Eugene Zolenko
e957a893a3 - fix for indent 2020-02-12 11:48:43 -07:00
Eugene Zolenko
df241da73f - undoing debug code 2020-02-11 16:30:44 -07:00
Eugene Zolenko
cd76b42f55 - warning message for objectHashIgnoreUnknownHack option 2020-02-11 16:28:57 -07:00
Eugene Zolenko
23f63b4da2 - build 2019-12-03 10:24:39 -07:00
chencheng (云谦)
4217346054 feat: support options.cwd (#197) 2019-12-03 10:20:41 -07:00
Eugene Zolenko
bc5b419c79 - merging #190
- readme and tslint updates
2019-11-05 10:34:39 -07:00
Marijn Haverbeke
e12631c160 Restore "Use PluginContext.emitFile to emit declarations (when possible) (#181)""
This reverts commit c35e35d627ec2b00739dede33ef1d6746ece7ad4.
2019-11-04 14:07:38 +01:00
Eugene Zolenko
c35e35d627 Revert "Use PluginContext.emitFile to emit declarations (when possible) (#181)"
This reverts commit 551a14e773141cd993bb9d1ffd349c92481edf11.
2019-10-15 11:15:21 -06:00
Marijn Haverbeke
551a14e773 Use PluginContext.emitFile to emit declarations (when possible) (#181)
Issue #180
2019-10-15 11:00:06 -06:00
Eugene Zolenko
63a7ac281e - fix for linter 2019-09-26 15:27:21 -06:00
Charles Simard-Lecours
f24359e668 fix(plugin) fix missing files 2019-09-26 14:52:56 -04:00
Eugene Zolenko
776535534e - forwarding transformers afterDeclarations
#173
2019-09-11 11:01:26 -06:00
Mateusz Burzyński
dca40becaf Add .js extension to virtual tslib (#170) 2019-09-09 14:56:07 -06:00
Eugene Zolenko
0420a5f06a - build with updated packages 2019-08-28 17:49:56 -06:00
Eugene Zolenko
24284605f3 - build and package version 2019-08-28 17:35:44 -06:00
Nick McCurdy
ffda2e539b Move cache directory to node_modules (#167)
* Move cache directory to node_modules

* Use find-cache-dir to find .cache in node_modules
2019-08-28 17:26:05 -06:00
Eugene Zolenko
b0a0ecb5ee - not trying to resolve imports unrelated to this plugin
- version
#162
2019-08-01 15:57:35 -06:00
Eugene Zolenko
23420c4b89 - not generating typings for files that are not actually imported
#162, #136
2019-08-01 15:45:37 -06:00
Eugene Zolenko
e60eb417d4 - fix for declarations for type only imports on watch
#163
2019-07-26 11:36:19 -06:00
Eugene Zolenko
9be93f36d0 - updating dependencies 2019-07-10 14:21:21 -06:00
Eugene Zolenko
74d267f4eb removing file existance check when loading snapshot (fix for #154) 2019-06-17 10:47:02 -06:00
Warren Seine
5b629f17e8 Update diagnostic message according to standard tool parsing. (#151)
MSBuild and many other tools / IDEs will correctly parse the message if ":" is added right after the error code.

See https://blogs.msdn.microsoft.com/msbuild/2006/11/02/msbuild-visual-studio-aware-error-messages-and-message-formats/ for reference.
2019-05-17 13:22:53 -06:00
Eugene Zolenko
2d33064031 - adding all imports to rollup watch #147, #7 2019-03-25 16:25:03 -06:00
ezolenko
6572018189 - fix for #144 2019-03-13 08:48:56 -06:00
ezolenko
33b99bf9af - fix for lint errors 2019-03-11 14:02:46 -06:00
ezolenko
578536a596 - merge 2019-03-11 13:58:45 -06:00
ezolenko
29b13a089b - updating dependencies 2019-03-11 13:52:52 -06:00
Yu Chao Liang
b00ae06943
- if output.file not exist use output.dir 2019-03-09 02:18:35 +08:00
Eugene Zolenko
f4ee39c979 - partial support for project references #139 2019-02-25 14:33:04 -07:00
Eugene Zolenko
9188132749 - refactoring 2019-02-25 11:18:48 -07:00
Eugene Zolenko
36aabef5ca - printing rollup version 2019-02-25 10:56:01 -07:00
Eugene Zolenko
ac9b15defa - fix for #137 2019-02-19 12:25:57 -07:00
Eugene Zolenko
d1082d830f - fix for #131 2019-01-15 18:15:43 -07:00
Eugene Zolenko
6b0225a7de - redoing switch to generateBundle (#126 #127 #128)
- using rollup's own types
- min rollup bumped to 0.68
- updating dependencies
- package version 0.19
2019-01-04 15:52:31 -07:00
Eugene Zolenko
eef600da27
Revert "Do not use deprecated rollup options (#127)" (#128)
This reverts commit b1d5c07b5cc3c2249e2d2972920f6973f261650c.
2019-01-03 11:35:04 -07:00
Florent Cailhol
b1d5c07b5c Do not use deprecated rollup options (#127) 2019-01-03 11:20:33 -07:00
Allex
2ad63daeb8 Optional dependency of typescript. (#122) 2018-12-11 10:42:36 -07:00
Eugene Zolenko
c400b95296 - fix for #32 2018-12-03 16:40:42 -07:00
Eugene Zolenko
3a6079c1ec - using allowNonTsExtensions to let other plugins generate typescript #111 2018-10-30 10:23:22 -06:00
Eugene Zolenko
892b3a0899 - not bailing on pre-release versions of typescript (#117)
- updating dependencies
2018-10-15 10:57:01 -06:00