Comparing version 4.1.2 to 4.1.3
@@ -6,2 +6,13 @@ # Change Log | ||
## [4.1.3](https://github.com/sapegin/mrm/compare/mrm-core@4.1.2...mrm-core@4.1.3) (2020-10-26) | ||
### Bug Fixes | ||
* **mrm-core:** Fix adding packages to Yarn workspaces ([#100](https://github.com/sapegin/mrm/issues/100)) ([4c23e05](https://github.com/sapegin/mrm/commit/4c23e05087470b3f773c965420bdddc28bf2a5bd)) | ||
## [4.1.2](https://github.com/sapegin/mrm/compare/mrm-core@4.1.1...mrm-core@4.1.2) (2020-08-19) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "mrm-core", | ||
"version": "4.1.2", | ||
"version": "4.1.3", | ||
"description": "Utilities to make tasks for Mrm", | ||
@@ -56,3 +56,3 @@ "author": { | ||
], | ||
"gitHead": "16dc19f2a65779db18eaecfe9d587ed8e09bb95d" | ||
"gitHead": "8f84fbf60a0243ae0c87853c0d4681e5d7cbba97" | ||
} |
@@ -62,3 +62,9 @@ jest.mock('fs'); | ||
expect.stringMatching(/yarn(\.cmd)?/), | ||
['add', '--dev', 'eslint@latest', 'babel-core@latest'], | ||
[ | ||
'add', | ||
'--dev', | ||
'--ignore-workspace-root-check', | ||
'eslint@latest', | ||
'babel-core@latest', | ||
], | ||
options | ||
@@ -85,3 +91,8 @@ ); | ||
expect.stringMatching(/yarn(\.cmd)?/), | ||
['add', 'eslint@latest', 'babel-core@latest'], | ||
[ | ||
'add', | ||
'--ignore-workspace-root-check', | ||
'eslint@latest', | ||
'babel-core@latest', | ||
], | ||
options | ||
@@ -98,3 +109,9 @@ ); | ||
expect.stringMatching(/yarn(\.cmd)?/), | ||
['add', '--dev', 'eslint@latest', 'babel-core@latest'], | ||
[ | ||
'add', | ||
'--dev', | ||
'--ignore-workspace-root-check', | ||
'eslint@latest', | ||
'babel-core@latest', | ||
], | ||
{ | ||
@@ -101,0 +118,0 @@ cwd: undefined, |
@@ -115,2 +115,8 @@ // @ts-check | ||
* | ||
* This will use yarn's `--ignore-workspace-root-check` to allow additions of packages | ||
* inside a repository that is using yarn's workspaces feature. If the current | ||
* repository is _not_ using workspaces, then that flag is simply ignored. | ||
* | ||
* @see https://classic.yarnpkg.com/en/docs/cli/add/#toc-yarn-add-ignore-workspace-root-check-w | ||
* | ||
* @param {string[]} deps | ||
@@ -121,3 +127,5 @@ * @param {RunOptions} [options] | ||
function runYarn(deps, options = {}, exec) { | ||
const add = options.dev ? ['add', '--dev'] : ['add']; | ||
const add = options.dev | ||
? ['add', '--dev', '--ignore-workspace-root-check'] | ||
: ['add', '--ignore-workspace-root-check']; | ||
const remove = ['remove']; | ||
@@ -124,0 +132,0 @@ const args = (options.remove ? remove : add).concat(deps); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116327
3639