find-yarn-workspace-root
Advanced tools
Comparing version
@@ -5,2 +5,17 @@ # Change Log | ||
<a name="2.0.0"></a> | ||
# [2.0.0](https://github.com/square/find-yarn-workspace-root/compare/v1.2.1...v2.0.0) (2020-06-11) | ||
### Chores | ||
* **deps:** update micromatch to v4 ([c7e8189](https://github.com/square/find-yarn-workspace-root/commit/c7e8189)) | ||
### BREAKING CHANGES | ||
* **deps:** requires Node >= 8.6 | ||
<a name="1.2.1"></a> | ||
@@ -7,0 +22,0 @@ ## [1.2.1](https://github.com/square/find-yarn-workspace-root/compare/v1.2.0...v1.2.1) (2018-08-30) |
'use strict'; | ||
const fs = require('fs-extra'); | ||
const fs = require('fs'); | ||
const micromatch = require('micromatch'); | ||
@@ -49,6 +49,6 @@ const path = require('path'); | ||
const file = path.join(dir, 'package.json'); | ||
if (fs.pathExistsSync(file)) { | ||
return fs.readJsonSync(file); | ||
if (fs.existsSync(file)) { | ||
return JSON.parse(fs.readFileSync(file, 'utf8')); | ||
} | ||
return null; | ||
} |
{ | ||
"name": "find-yarn-workspace-root", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"description": "Algorithm for finding the root of a yarn workspace, extracted from yarnpkg.com", | ||
@@ -14,2 +14,4 @@ "repository": { | ||
"scripts": { | ||
"lint": "yarn lint:js", | ||
"lint:js": "eslint .", | ||
"test": "mocha tests/**/*-test.js", | ||
@@ -22,13 +24,13 @@ "commitmsg": "commitlint -e $GIT_PARAMS" | ||
"dependencies": { | ||
"fs-extra": "^4.0.3", | ||
"micromatch": "^3.1.4" | ||
"micromatch": "^4.0.2" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^5.2.6", | ||
"@commitlint/config-conventional": "^5.2.3", | ||
"chai": "^4.1.2", | ||
"husky": "^0.14.3", | ||
"mocha": "^4.0.1", | ||
"standard-version": "^4.2.0" | ||
"@commitlint/cli": "^7", | ||
"@commitlint/config-conventional": "^7", | ||
"chai": "^4.2.0", | ||
"eslint": "^6.8.0", | ||
"husky": "^3", | ||
"mocha": "^7", | ||
"standard-version": "^4" | ||
} | ||
} |
# find-yarn-workspace-root | ||
[](https://travis-ci.org/square/find-yarn-workspace-root) | ||
 | ||
@@ -8,2 +8,3 @@ Algorithm for finding the root of a yarn workspace, extracted from yarnpkg.com | ||
## Installation | ||
```bash | ||
@@ -14,2 +15,3 @@ yarn add find-yarn-workspace-root | ||
## Usage | ||
```js | ||
@@ -43,11 +45,15 @@ const findWorkspaceRoot = require('find-yarn-workspace-root'); | ||
Releases are handled by Travis CI once a build succeeds on `master`. To trigger a release, bump the version using `standard-version`: | ||
To trigger a release, bump the version using `standard-version`: | ||
```bash | ||
$(yarn bin)/standard-version | ||
``` | ||
1. To update the CHANGELOG, bump the version in `package.json`, and create a git tag, run: | ||
That should update the CHANGELOG, bump the version in `package.json`, and create a git tag. Then, just `git push && git push --tags`. | ||
```bash | ||
$(yarn bin)/standard-version | ||
``` | ||
2. `git push && git push --tags` | ||
3. `npm publish` | ||
--- | ||
Copyright 2017 Square, Inc. |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
16706
1.44%1
-50%57
11.76%7
16.67%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated