question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nx.json - Be able to add as implicit dependency value a RegExp

See original GitHub issue

Currently, Nx does not allow you to specify a regexp as the value of an implicit dependency such as package.json

Prerequisites

  "npmScope": "mycompany",
  "implicitDependencies": {
    "angular.json": "*",
    "package.json": {
      "dependencies": "@mycompany/lib/*",
      "devDependencies": "*"
    }

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation (nx.dev) and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)

Expected Behavior

Should trigger the target action only if the @mycompany/lib has been changed

Please describe the behavior you are expecting

Current Behavior

What is the current behavior?

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2

If you can provide steps to reproduce from scratch, that would be enormously appreciated (i.e. where the first step is npx create-nx-workspace@latest repro-workspace)

Context

Please provide any relevant information about your setup:

Example of nx.json

  "npmScope": "mycompany",
  "implicitDependencies": {
    "angular.json": "*",
    "package.json": {
      "dependencies": "@mycompany/lib/*",
      "devDependencies": "*"
    }

A minimal reproduction scenario allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.

Failure Logs

Please include any relevant log snippets or files here.

Other

Any other relevant information that will help us help you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
bekoscommented, Sep 17, 2020
1reaction
bekoscommented, Aug 28, 2020

@mehrad-rafigh sorry I missed your response! no, it doesn’t seem to be supported 😞 the problem I see though, is that the proposed syntax is not compliant with the current format, as the value of implicitDependencies is always the affected projects 🤔 So a syntax that would make more sense could be:

"implicitDependencies": {
  "angular.json": "*",
  "package.json": {
    "dependencies": {
      "@mycompany/lib/*": ["myapp"],
     },
    "devDependencies": "*"
  }
}

I will try to take a look and see if this an easy change 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

globalImplicitDependencies - Nx
Global Implicit Dependencies. As of Nx 14.4, it is better to use inputs and namedInputs instead of the implicitDependencies previously defined in nx.json...
Read more >
ECMA-262 Edition 5.1 - ECMAScript Language Specification
SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT ... the Number object, the Math object, the Date object, the RegExp...
Read more >
ECMAScript® 2023 Language Specification - TC39
Every object created by a constructor has an implicit reference (called the object's prototype) to the value of its constructor 's "prototype" property....
Read more >
validate semver version in package.json dependency value
The referenced regex is a starting point. It only covers the isolated semver string itself. Shouldn't be too difficult to add/test what you...
Read more >
@nrwl/next: Versions | Openbase
angular: add error handling for cypress mf to correct file #12118 (#12234) (7ea0df8) ... misc: add builders key to nx package.json (#12244) (44f99ad) ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found