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.

[Feature] Extracted config files

See original GitHub issue

To preface this I would like to say that I’m not sure it fits in feature requests, maybe it’s a compatibility depending on how you see it.

  • I’d be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn’t do

Describe the user story

My project use react-redux-typescript-scripts which is a package that contains common configuration for react/redux/typescript projects.

In my tsconfig.json I write the following :

{
  ...
  "extends": "./node_modules/react-redux-typescript-scripts/tsconfig.json",
  ...
}

When moving to berry I lost the node_modules and the configuration file is not longer available. In my case it’s a config file, but it can also be sass/css files that need to be imported into a pre-processor, external to the project itself.

Describe the solution you’d like

Being able to tell yarn to extract a particular file or package could be the simplest way to go. A .yarnrc.yml could look like :

extractFiles:
  - 'mypackagename:./path-to-file'

Clearly this would impact the cache directory and zer0 installs but right now this is only way to provide a compatibility.

Maybe this could belong in a plugin, I’m not sure of what plugins are capable of.

Describe the drawbacks of your solution

Will increase the size of committed cache, but the effect is negligible.

Describe alternatives you’ve considered

Why not make it a plugin? I have no idea, maybe plugins can do that. Not to rant but at some point if you want adoption you have to consider lowering the number of steps required for user to migrate.

The only alternative I see is to manually copy the file into my project root in order to be able to access it. Obviously this is an issue for package updates for exemple.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
merceyzcommented, Feb 23, 2021

In my tsconfig.json I write the following :

tsconfig files let you use the name of the dependency. (I.e. react-redux-typescript-scripts/tsconfig.json)

but it can also be sass/css files that need to be imported into a pre-processor, external to the project itself.

You can use require.resolve to get the location of any dependency

1reaction
arcaniscommented, Feb 23, 2021

Being able to tell yarn to extract a particular file could be the simplest way to go.

That wouldn’t work - those files could themselves reference resources, which would then be resolve relative to the extracted file (which would be incorrect).

or package

You can already do it with unplugged

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Extract Features — VISSL 0.1.5 documentation
Once users have the desired config file, user can extract features using the following command. VISSL also provides the config files here that...
Read more >
How to use emobase.config file in Opensmile? - Stack Overflow
I want to extract audio features using opensmile using the predefined emobase.config file. However when I enter a .wav and I get the...
Read more >
Configuration file in TensorFlow Object Detection Api
( 16,16). General configuration file: Here we are extracting the features using the resnet architecture , we can also extract the features using...
Read more >
6.2. Feature extraction — scikit-learn 1.2.0 documentation
The sklearn.feature_extraction module can be used to extract features in a ... The default configuration tokenizes the string by extracting words of at ......
Read more >
Configuring the Data Extract utilityorder configuration file
If you want to change the location of the directory, include the relative path from the order configuration file directory or the absolute...
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