-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(it-tests): test schematics with yarn 1 #1230
base: main
Are you sure you want to change the base?
Conversation
32ee46a
to
6485b74
Compare
f62f635
to
7a0e5ad
Compare
da5efe8
to
48b6dff
Compare
48b6dff
to
3e78e32
Compare
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 0f2b6b9. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
fe76f58
to
9c22f6f
Compare
ff2c4c6
to
4c6d5fc
Compare
4c6d5fc
to
8f41033
Compare
995e5fa
to
73e5b52
Compare
7914831
to
f03bba0
Compare
6c27dc6
to
fd8f9ca
Compare
fbb0efc
to
232a975
Compare
execFileSync('yarn', ['config', 'set', '@ama-sdk:registry', options.registry], execOptions); | ||
execFileSync('yarn', ['config', 'set', '@ama-terasu:registry', options.registry], execOptions); | ||
execFileSync('yarn', ['config', 'set', '@o3r:registry', options.registry], execOptions); | ||
execFileSync('yarn', ['config', 'set', 'unsafeHttpWhitelist', '127.0.0.1'], execOptions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I remember correctly, these are modifying the ~/.yarnrc
on the machine, not at project level
this is probably fine for the CI but not ideal when running locally
it might be better to directly modify the file like you do line 274 instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true that. I'll do the updates directly on the file in the project
EDIT trying to do the change I realized that yarn 1 is using the root yarnrc for the global packages scopes (at least) and not the local one. It;s strange because it is not the case for global/cache folders for instance.
5800def
to
27e6a3a
Compare
|
||
if (options.globalFolderPath) { | ||
if (!content.includes('prefix')) { | ||
appendFileSync(yarnRcPath, `\nprefix "${posix.join(options.globalFolderPath.split(sep).join(posix.sep), `yarn1-global-folder`, options.packageScope || '')}"`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appendFileSync(yarnRcPath, `\nprefix "${posix.join(options.globalFolderPath.split(sep).join(posix.sep), `yarn1-global-folder`, options.packageScope || '')}"`); | |
appendFileSync(yarnRcPath, `\nprefix "${posix.join(options.globalFolderPath.split(sep).join(posix.sep), 'yarn1-global-folder', options.packageScope || '')}"`); |
['cache-folder', 'global-folder'].forEach(folder => { | ||
if (!content.includes(folder)) { | ||
appendFileSync(yarnRcPath, `\n${folder} "${posix.join(options.globalFolderPath!.split(sep).join(posix.sep), `yarn1-${folder}`, options.packageScope || '')}"`); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
['cache-folder', 'global-folder'].forEach(folder => { | |
if (!content.includes(folder)) { | |
appendFileSync(yarnRcPath, `\n${folder} "${posix.join(options.globalFolderPath!.split(sep).join(posix.sep), `yarn1-${folder}`, options.packageScope || '')}"`); | |
} | |
}); | |
['cache-folder', 'global-folder'] | |
.filter((folder) => !content.includes(folder)) | |
.forEach(folder => { | |
appendFileSync(yarnRcPath, `\n${folder} "${posix.join(options.globalFolderPath!.split(sep).join(posix.sep), `yarn1-${folder}`, options.packageScope || '')}"`); | |
}); |
* 'yarn', 'npm' | ||
*/ | ||
export function getPackageManager() { | ||
return getVersionedPackageManager() === 'npm' ? 'npm' : 'yarn'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return getVersionedPackageManager() === 'npm' ? 'npm' : 'yarn'; | |
const pm = getVersionedPackageManager(); | |
return pm.startsWith('yarn') ? 'yarn' : pm; |
3aa9e25
to
309e8f4
Compare
309e8f4
to
60099a5
Compare
ee6748c
to
aeb9bbe
Compare
aeb9bbe
to
38a2dea
Compare
38a2dea
to
0f2b6b9
Compare
Proposed change
Related issues
Fixes
yarn create
not working for Yarn 1.* #1189yarn 1.*
#1227