171 Commits

Author SHA1 Message Date
Calvin Lai
469a6d1462
fix(js): add outfile to swc compiler in non-watch mode. fixes #12344 (#12345) 2022-10-07 16:18:01 +07:00
Chau Tran
142ed2eead
feat(js): inline non-buildable libs for tsc and swc (#12280)
Co-authored-by: Chau Tran <chautran@10.0.0.10>
2022-10-07 09:46:43 +07:00
Miroslav Jonaš
5e293eba4c
feat(core): map lock file data to external dependencies (#12185) 2022-10-05 20:58:28 -04:00
Jack Hsu
d904160426
fix(bundling): do not add types field in package.json for esbuild (#12424) 2022-10-05 16:24:25 +00:00
Jack Hsu
9a57940c6f
chore(bundling): cleanup esbuild setup (#12260) 2022-09-27 15:43:02 -04:00
Victor Savkin
e778644323
Revert "chore(js): inline non-buildbale (#12170)"
This reverts commit 24cb3cd57442229e81f8a85452c56818d26194a6.
2022-09-27 10:29:55 -04:00
Chau Tran
24cb3cd574
chore(js): inline non-buildbale (#12170)
Co-authored-by: Chau Tran <chautran@Chaus-MacBook-Pro.local>
2022-09-27 11:23:09 +00:00
Jack Hsu
0baae01e37
fix(js): update library generator for webpack and rollup bundler (#12183) 2022-09-22 14:50:17 +00:00
Jack Hsu
2d84bd3eb4
chore(bundling): clean up package.json update function (#12152) 2022-09-21 10:53:14 -04:00
Jack Hsu
75115e100a
fix(js): support both .cjs and .js file extensions when generating package.json file (#12137) 2022-09-21 00:49:46 +00:00
Jack Hsu
ed7db7c114
feat(bundling): add esbuild plugin (#12053) 2022-09-20 12:05:58 -04:00
Xie Jay
b3e69e2591
feat(js): add rootDir option (#11678)
close #11601, close #9410, close #10707

Co-authored-by: xiejay97 <xiejay97gmail.com>
2022-09-13 00:13:58 +00:00
Chau Tran
2508cb04a6
Revert "feat(js): add srcRootForCompilationRoot option to tsc executor (#10707)" (#11977)
This reverts commit aa01b7bd2d30bc4b16f831189d153eca618ec27b.

Co-authored-by: Chau Tran <chautran@Chaus-MacBook-Pro.local>
2022-09-12 13:31:45 +00:00
Nozomu Miyamoto
aa01b7bd2d
feat(js): add srcRootForCompilationRoot option to tsc executor (#10707)
* feat(js): add `srcRootForCompilationRoot` option to tsc executor

ISSUES CLOSED: #9410

* docs(js): add description for `srcRootForCompilationRoot` option
2022-09-12 20:14:23 +07:00
Jack Hsu
cd3352aaa2
fix(js): remove check for non-buildable libs being used when packaging. (#11835)
- unblocks custom server in next.js
- builds are guaranteed to happen if nx.json is configured correctly
- if a package isn't buildable it will be included in the package in the
  near-future
2022-09-01 18:07:24 -04:00
Craigory Coppola
6948ffdcff fix(core): project graph should be read from executor context
These changes lower the risk of reading the cache during a write operation when multiple
processes are actively writing / reading the cache.
2022-08-19 12:50:07 -04:00
Jean-Philippe Bergeron
20996d6c40
fix(nx): Ignore the debugger attached message in node (#11131)
* fix(js): update compile-swc.ts

* fix(js): update packages/js/src/utils/swc/compile-swc.ts

Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>

* chore(js): format source code

Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2022-08-02 09:31:01 +07:00
Jack Hsu
7fd7af3195
feat(js): add --clean/--no-clean option to tsc and swc executors (#11311) 2022-07-27 15:04:22 +00:00
Jack Hsu
3a63eeab21
chore(core): remove checks for built dependencies in executors since dependsOn guarantees that they are built (#11227) 2022-07-20 15:56:57 +00:00
Jason Jean
5b17335f4d Revert "feat(core): support nested ignore files (#10455)"
This reverts commit 36d8ee26c430def7b68b123d1b87b792928411d2.
2022-06-13 13:16:05 -04:00
Gabriel Terwesten
36d8ee26c4
feat(core): support nested ignore files (#10455) 2022-06-10 14:05:41 -04:00
adriangroch
a42d681529
fix(js): check that project's package.json exists before attempting to read its contents (#10650) 2022-06-10 09:46:12 -04:00
Victor Savkin
029be8c868 Revert "fix(js): resolve shallow dependencies when building package.json (#10600)"
This reverts commit a0bf1f0b1218453ceaefb1e9c88e6a07deaeda3f.
2022-06-07 11:28:33 -04:00
Max Kramer
a0bf1f0b12
fix(js): resolve shallow dependencies when building package.json (#10600) 2022-06-06 14:11:48 -04:00
James
c0a0f16913
fix(js): semver regex update (#10416) 2022-06-04 04:56:34 +00:00
Chau Tran
5daeaf8e8f
fix(js): return empty array if no helper dependencies found (#10582)
* fix(js): return empty array if no helper dependencies found

* chore(js): add test for generate package json with helper dependency
2022-06-03 23:05:38 -05:00
Craigory Coppola
c9897c61e6
fix(core): swc should be an optional peer dependency (#10461) 2022-05-26 12:09:27 -04:00
Chau Tran
36010c1c0e
feat(js): implement a smarter compiler (tsc, swc) helper dependency d… (#10297)
* feat(js): implement a smarter compiler (tsc, swc) helper dependency detection

ISSUES CLOSED: #10270

* chore(js): add test to check for swc/helpers upon build lib
2022-05-20 14:14:30 -05:00
Jason Jean
04985be149
chore(repo): switch publishing to use lerna (#10293) 2022-05-20 00:35:47 +00:00
Chau Tran
17c40229a7
fix(js): format .lib.swcrc file with nx format (#10254) 2022-05-16 10:19:49 -04:00
Chau Tran
692418d2b7
fix(js): move swc/helpers to dependencies instead of devDependencies (#10275)
ISSUES CLOSED: #10270
2022-05-12 19:24:40 +00:00
Daniel Grant
63006b791a
fix(js): .swcrc path option should follow existing conventions (#10127)
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2022-05-06 13:46:13 -04:00
Daniele Tortora
664df0e849
feat(js): add --includeBabelRc flag for @nrwl/js:library generator (#8793, #8600) (#10055)
* fix(js): fix(js): adding missing babelrc for tsc compiled libraries

ISSUES CLOSED: #8600, #8793

ISSUES CLOSED: #8600, #8793

* feat(js): adds the --skipBabelConfig flag to prevent .babelrc file generation

ISSUES CLOSED: #8600, #8793
ISSUES CLOSED: #8600, #8793

* feat(js): adds the --includeBabelRc flag to the library generator

adds the --includeBabelRc flag to the library generator, and a mechanism to automatically detect the
nrwl/web plugin, which requires auto-generation of the babelrc even when not explicitly set by the
user

ISSUES CLOSED: #8600, #8793
2022-05-04 10:58:34 -05:00
Daniel Grant
a68120a35b
fix(js): .swcrc path should be customizable (#10118)
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2022-05-03 13:41:52 -04:00
Denis Frenademetz
a395e486e8
fix(core): emit success false in compileTypeScriptFiles if typescript diagnostic contains errors (#10068) 2022-04-30 00:50:37 -05:00
Chau Tran
5dbc98f9d8
fix(js): add missing --tag flag to the publish command (#10014) 2022-04-26 17:04:10 -04:00
Jack Hsu
c5a5eb30a2
fix(js): update minimal publish script to validate project name and config (#10006) 2022-04-26 11:10:15 -04:00
Caleb Ukle
39331d1e17
feat(testing): move jest config to .ts files (#9854)
* feat(testing): move jest config to .ts

move jest config and preset to ts files

ISSUES CLOSED: #8344

* fix(testing): update tests for jest.config.ts changes

update tests broken by renaming jest fils to ts files
2022-04-21 17:58:40 +00:00
Miroslav Jonaš
67b34a099f
fix(js): enable hidden files as assets (#9880) 2022-04-19 12:48:01 +02:00
Chau Tran
2735aa08df
feat(js): add publish target and generate minimal publish script for … (#9806)
* feat(js): add publish target and generate minimal publish script for publishable libraries

* fix(js): adjust minimal publish script to display better error for version validation

* Update packages/js/src/utils/minimal-publish-script.ts

Co-authored-by: Caleb Ukle <caleb@nrwl.io>

Co-authored-by: Caleb Ukle <caleb@nrwl.io>
2022-04-12 15:20:24 -05:00
Caleb Ukle
696fefdd7b
fix(js): ignore tsx and .test. files with buildable swc libraries (#9540)
include update to simplify existing patterns

ISSUES CLOSED: #9442

Co-authored-by: Caleb Ukle <caleb@Calebs-MBP-2.localdomain>
2022-04-11 08:59:44 -05:00
CommanderRoot
05a9544806
cleanup(misc): replace deprecated String.prototype.substr()
* cleanup(misc): replace deprecated String.prototype.substr()

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

* fix(js): fix slice change

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2022-04-01 23:04:26 +00:00
Victor Savkin
d4b5c30eba
cleanup(core): remove the indirection left after inlining ta… (#9469) 2022-03-23 22:18:17 -04:00
Craigory Coppola
2f85238f86
fix(js): improve inconsistencies with assets in tsc and swc from previous implementation (#9470) 2022-03-23 10:16:19 -04:00
Chau Tran
cb1fc0235a
fix(js): mimic the behavior of tsc compilation for runTypeCheck (#9240)
* fix(js): mimic the behavior of tsc compilation for runTypeCheck

ISSUES CLOSED: #9203

* chore(js): add check for type defs files in e2e

Co-authored-by: Chau Tran <ctran@Chaus-MacBook-Pro.local>
2022-03-21 16:33:34 -05:00
Giora Guttsait
f44165d993
feat(js): infer tslib as a dependency when using importHelpers (#9350) 2022-03-16 12:47:39 -04:00
Victor Savkin
6f038e7a4a feat(core): reorganize packges to consolidate all cli-related code in nx 2022-03-14 16:42:51 -04:00
Hannes Schmid
064d7ec30c
fix(js): execute postCompilationCallback in compileTypeScriptFiles in watch mode (#9254)
Execute the postCompilationCallback regardless of the watch option value

ISSUES CLOSED: #9253

Co-authored-by: Hannes Schmid <hannes.schmid@solunio.com>
2022-03-09 12:21:28 -06:00
Chau Tran
7d5988b5c8
fix(js): adjust .swcrc so that it works with swc/jest and no temp .swcrc needed (with migrations) (#9198)
* fix(js): remove hardcoded source-maps and add default value to sourceMaps in swcrc

ISSUES CLOSED: #9187

* fix(js): rename .swcrc to .lib.swcrc (with migrations)

* fix(js): revert jest config js tmpl in jest generator and replace jest config manually in JS generator

* chore(js): update snapshot

Co-authored-by: Chau Tran <ctran@Chaus-MacBook-Pro.local>
2022-03-07 09:14:31 -06:00
Chau Tran
229f71ef17
feat(nest): use nrwl/js to generate library (#9164)
* chore(js): rename GeneratorSchema to LibraryGeneratorSchema

* fix(js): add publishable to library generator schema

* feat(nest): use nrwl/js for library generator

* fix(js): update documentation about publishable

* chore(nest): fix depcheck for nrwl/js

* chore(nest): update test snapshot

* chore(nest): update nestjs/swagger version in node e2e

* chore(js): rename loadTsPlugins function

* fix(nest): default standaloneConfig for library generator to true

* feat(nest): rename tsPlugins to transformers and add tsPlugins to aliases

* chore(nest): fix e2e test on generate a new nest library

Co-authored-by: Chau Tran <ctran@Chaus-MacBook-Pro.local>
2022-03-03 15:47:06 -05:00