Backslashes on $schema property (Windows)
See original GitHub issueCurrent Behavior
When a new plugin project is created or existing plugin projects are migrated, the $schema
property contains backslahes in paths.
I am not sure, if this affected by plugin projects only or it is a general issue.
It is a similar problem like #10122
Wouldn’t it be a good idea to add some general tests to ensure that all generators on Windows never use backslashes? I love Nx and like to write tests. So if I could contribute in a feasible way, I would be exited.
Expected Behavior
The $schema
property should use forward slashes.
Steps to Reproduce
npx create-nx-workspace@14.1.5 another-monorepo --preset=apps
cd another-monorepo
npm install @nrwl/nx-plugin
npx nx generate @nrwl/nx-plugin:plugin another-plugin
The files libs/another-plugin/project.json
and apps/another-plugin-e2e/project.json
contain:
"$schema": "..\\..\\node_modules\\nx\\schemas\\project-schema.json"
Environment
Node : 16.13.2
OS : win32 x64
npm : 8.1.2
nx : 14.1.5
@nrwl/angular : Not Found
@nrwl/cypress : Not Found
@nrwl/detox : Not Found
@nrwl/devkit : 14.1.5
@nrwl/eslint-plugin-nx : 14.1.5
@nrwl/express : Not Found
@nrwl/jest : 14.1.5
@nrwl/js : 14.1.5
@nrwl/linter : 14.1.5
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : 14.0.3
@nrwl/nx-plugin : 14.1.5
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : Not Found
@nrwl/web : Not Found
@nrwl/workspace : 14.1.5
typescript : 4.6.4
rxjs : 6.6.7
---------------------------------------
Community plugins:
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Java Properties backslash - Stack Overflow
Backslashes are for escaped character sequences and split lines. Also note that you can use normal '/' slashes for pathnames in Windows. –...
Read more >Using Forward Slashes (/) and Backslashes (\)
The backslash (\) is the escape character for properties files, so if you edit a properties file by hand, you must use two...
Read more >Constructing a Bidi Communication Schema Query
In this article · The query must start with the Printer property, which must be preceded by a backslash character ( \ )....
Read more >Structure of the Registry - Win32 apps - Microsoft Learn
Value names and data can include the backslash character. The name of each subkey is unique with respect to the key that is...
Read more >WHERE Clause (WMI) - Win32 apps - Microsoft Learn
... event, or schema query. For more information, see Querying with WQL. The WHERE clause is made up of a property or keyword,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Feel free to throw a PR up, I’ll assign to you.
Fixed by commit 9e6e01b