49 Commits

Author SHA1 Message Date
Leosvel Pérez Espinosa
ada8be473d
fix(misc): fix misc issues in project generators for the ts solution setup (#30111)
The following are the main changes in the context of the TS solution
setup:

- Ensure `name` in `package.json` files is set to the import path for
all projects
- Set `nx.name` in `package.json` files when the user provides a name
different than the package name (import path)
- Clean up project generators so they don't set the `nx` property in
`package.json` files unless strictly needed
- Fix `@nx/vue:application` generator so it creates the Nx config in a
`package.json` file for e2e projects
- Ensure `@types/node` is installed in `vitest` generator
- Fix generated Vite config typing error (surfaced with Vite 6)
- Ensure `jsonc-eslint-parser` is installed when the
`@nx/dependency-checks` rule is added to the ESLint config
- Misc minor alignment changes

## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2025-03-05 20:08:10 -05:00
Leosvel Pérez Espinosa
dd9b09f917
fix(js): generate js libs with exports in package.json and ensure esm output when using rollup bundler (#29565)
- Ensure libs are generated with `exports` in `package.json`
- Generate `types` instead of `typings` in package.json
- Update js lib with rollup to only output esm
- Update `tsconfig.spec.json` for js libraries with rollup to set
`module: esnext` and `moduleResolution: bundler` (they use `@swc/jest`)
- Fix `@nx/js/typescript` issue with absolute paths when normalizing
inputs/outputs
- Fix `@nx/js/typescript` issue identifying buildable libs
- Fix express app generator not installing `@types/express`

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2025-01-10 08:29:09 -05:00
Leosvel Pérez Espinosa
db47dc30a5
feat(js): support esbuild and swc bundlers with the new ts solution config setup (#28409)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-10-14 09:30:43 +02:00
Leosvel Pérez Espinosa
c92528f65d
feat(misc): remove derived generator paths (#27714)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-09-23 09:19:42 -04:00
James Henry
68eeb2eeed
feat(linter): create new workspaces with ESLint v9 and typescript-eslint v8 (#27404)
Closes #27451

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-09-12 16:02:27 -04:00
Jack Hsu
adcefcc6da
chore(bundling): rename env vars so we do not cause Nx Cloud connection errors (#27681)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-08-28 12:17:28 -04:00
Colum Ferry
c427717fc1
fix(esbuild): declaration:true should find the correct package root regardless of cwd #26261 (#27560)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
The types that are generated for esbuild packages are not placed into
the correct folder structure in the built package and is very dependent
of the CWD.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The declaration files should be generated correctly to match the package
and not dependent on CWD

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26261 #26376
2024-08-21 17:08:13 +01:00
Jason Jean
064eb714cf
chore(repo): update nx to 19.5.0-beta.5 (#26925)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

This repo uses Nx `19.4.0-rc.1`

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

This repo uses Nx `19.5.0-beta.5`

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-07-17 11:12:21 -04:00
Craigory Coppola
b2e6662e19
chore(repo): dont use unit-test-setup during e2e (#26393)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-06-06 15:57:24 -04:00
castleadmin
7f32d8643d
feat(bundling): added support for declarations (*.d.ts) (#21084)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
esbuild doesn't support the creation of declaration files (*.d.ts) and
probably never will (see https://github.com/evanw/esbuild/issues/95).
Since declaration files are essential for published libraries,
it would be great if @nx/esbuild:esbuild would provide an option to
output them.

## Expected Behavior

- Introduced a new boolean valued `declaration` option for the `esbuild`
executor
- If `declaration` or the tsconfig option
[declaration](https://www.typescriptlang.org/tsconfig#declaration) is
true,
then the TypeScript compiler is used before esbuild to generate the
declarations
- The output directory structure of the declarations can be influenced
by setting the TypeScript rootDir via the `declarationRootDir` option

## Related Issue(s)
https://github.com/nrwl/nx/issues/20688

### Additional Comment
Please note that the generated declaration files directory structure is
affected by the tsconfig `rootDir` property.

For a library that doesn't reference other libraries inside the
monorepo, the `rootDir` property can be changed freely.
If a library inside the monorepo is referenced the `rootDir` property
must be set to the workspace root.

The `tsc` executor has a sophisticated check that automatically sets the
`rootDir` to the workspace root if a library is referenced.

https://github.com/nrwl/nx/blob/master/packages/js/src/executors/tsc/tsc.impl.ts#L104

This check is quite complex and specific to the `tsc` executor options.
Therefore, it hasn't been included inside the esbuild implementation.

The current implementation leaves it to the user to solve the edge case
by removing the `declarationRootDir` option or by setting the
`declarationRootDir` to `.`.

In the future, it might make sense to generalize and use the `tsc`
executor check.
2024-05-16 17:16:43 +03:00
James Henry
24060dc650
chore(repo): prepopulate verdaccio storage for e2e-ci (#23429) 2024-05-16 10:06:25 -04:00
Jason Jean
df7e40d547
feat(repo): split e2e tests (#22927) 2024-04-25 10:13:03 -04:00
Jack Hsu
b7ffb257a2
fix(bundling): prevent sensitive keys from being bundled (#22413) 2024-03-20 13:01:43 -04:00
Austin Fahsl
38179ad278
feat(js): replace publish script with nx release config (#21474) 2024-03-05 17:53:07 -05:00
James Henry
f9641081a1
chore(testing): disable flaky watch e2e in esbuild (#20390) 2023-11-23 10:58:58 -05:00
Jack Hsu
75062ef4e8
fix(bundling): fix regression with --thirdParty option for esbuild (#19835) 2023-10-25 08:18:30 -04:00
Jack Hsu
76a7506074
feat(js): remove options to update package.json dependencies and peerDependencies (#19543) 2023-10-12 12:06:45 -04:00
Jack Hsu
a9230f289f
chore(js): re-enable skipped test (#19427) 2023-10-03 11:18:12 -06:00
Jason Jean
50b62524f5
chore(misc): remove e2e utils that use internal nx functions (#19085) 2023-09-11 19:56:58 -04:00
Simon Critchley
3771c325bc
Revert "feat(repo): enable agents" (#19112) 2023-09-11 15:58:09 -04:00
Victor Savkin
018d9972ee feat(repo): add cloud workflows 2023-09-08 12:04:36 -04:00
Jack Hsu
f6ad6998d4
chore(misc): fix lockfile check in nightly (#18954) 2023-08-31 16:54:43 -04:00
Emily Xiong
40d66ec715
chore(core): remove readProjectsConfigurations from workspaces (#18329)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-08-15 14:48:40 -04:00
Igor Loskutov
a5d6a293aa
fix(core): esbuild generateLockfile according to docs (#18413) 2023-08-01 16:29:38 +03:00
Jack Hsu
b07d24ef42
feat(js): create package.json with proper defaults (#18091)
Co-authored-by: Miroslav Jonaš <meeroslav@users.noreply.github.com>
2023-07-18 08:53:18 +02:00
MaxKless
59f696c85b
cleanup(misc): remove outdated run-e2e-tests targets (#18147) 2023-07-17 15:05:39 -04:00
Leosvel Pérez Espinosa
5c98726627
cleanup(bundling): fix esbuild e2e test case (#17890) 2023-07-11 10:29:20 -04:00
Emily Xiong
075ac2545d
chore(repo): change e2e to use verdaccio executor (#17347) 2023-06-07 12:26:43 -04:00
Jason Jean
a0d18bb588
chore(repo): replace references to @nrwl in e2e tests (#16441) 2023-04-24 18:48:44 -04:00
Jack Hsu
bef152d94e
feat(bundling): remove esbuild 0.16.0 support (#16435) 2023-04-20 08:14:52 -06:00
Jack Hsu
807884c91d
feat(bundling): add support for esbuild.config.js file (#16092) 2023-04-04 19:16:32 +00:00
Jack Hsu
7ebca5107e
feat(bundling): add for esbuild to enable/disable package.json generation (#15777) 2023-03-21 08:48:16 -04:00
Katerina Skroumpelou
b84125f9dd
fix(js): integrate buildable bundler and compiler options (#15376) 2023-03-03 09:56:57 -05:00
Jason Jean
92610fe4b6
chore(repo): update nx to 15.8.0-beta.7 (#15293) 2023-02-27 17:24:06 -05:00
Jason Jean
84fedf36e0
Revert "chore(repo): update nx to 15.8.0-beta.6" (#15274) 2023-02-26 12:39:15 -05:00
Jason Jean
3c50474f40
chore(repo): update nx to 15.8.0-beta.6 (#15247) 2023-02-26 02:26:53 -05:00
Jack Hsu
53a1c427e4
fix(bundling): copy initial assets correctly in watch mode for esbuild (#15230) 2023-02-24 10:54:08 -05:00
Jack Hsu
2d566593c0
fix(bundling): support additionalEntryPoints properly (#14773) 2023-02-02 13:20:18 -05:00
Jack Hsu
5cfd357e8f
feat(bundling): update esbuild to 0.17.5 (#14752) 2023-02-01 10:55:55 -07:00
Jack Hsu
bd14b24460
feat(bundling): add option to esbuild to not bundle (#14145) 2023-01-04 13:36:52 -05:00
Craigory Coppola
7992ec618f
chore(repo): setup negative config for several targets (#14080) 2023-01-04 11:34:50 -05:00
Craigory Coppola
f311ecbdd7
chore(repo): remove workspace.json (#13040) 2022-11-08 13:12:31 -05:00
Jack Hsu
58b51964ea
feat(bundling): add support only bundling in workspace libs, not npm packages (#12852) 2022-10-31 09:05:47 -04:00
Victor Savkin
23de788b5e
chore(repo): update to 15.0.0-rc1 (#12586) 2022-10-13 18:34:24 -04:00
Jack Hsu
a14646a864
fix(bundling): correct main field in package.json when using esbuild (#12328) 2022-09-29 22:11:00 +00:00
Jack Hsu
9a57940c6f
chore(bundling): cleanup esbuild setup (#12260) 2022-09-27 15:43:02 -04:00
Jack Hsu
1b06110de1
fix(bundling): support type checking when using esbuidl with --watch (#12192) 2022-09-22 18:01:57 +00:00
Jack Hsu
9d0d6d0402
fix(bundling): set correct rootDir compiler option for type checker (#12182) 2022-09-22 13:25:23 +00:00
Jack Hsu
ed7db7c114
feat(bundling): add esbuild plugin (#12053) 2022-09-20 12:05:58 -04:00