You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2023/11/14 03:18:33 UTC

(incubator-annotator) 01/01: Replace yarn with npm

This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch 154-yarn-to-npm
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git

commit affbc9ed2348739e2eb8e547918eb8a193a73d21
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Oct 14 21:10:27 2023 -0700

    Replace yarn with npm
    
    Close #154.
---
 .husky/pre-commit |  2 +-
 .ratignore        |  2 +-
 Makefile          |  8 ++++----
 README.md         |  4 ++--
 lerna.json        |  4 ----
 package.json      | 19 ++++++++-----------
 6 files changed, 16 insertions(+), 23 deletions(-)

diff --git a/.husky/pre-commit b/.husky/pre-commit
index 98b849d..3db59e8 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -21,4 +21,4 @@
 
 . "$(dirname "$0")/_/husky.sh"
 
-yarn run lint-staged
+npx lint-staged
diff --git a/.ratignore b/.ratignore
index 812a6c5..6cc9b3f 100644
--- a/.ratignore
+++ b/.ratignore
@@ -4,9 +4,9 @@
 lerna\.json
 node_modules
 package\.json
+package-lock\.json
 tsconfig(\.\w+)?\.json
 typedoc\.json
-yarn\.lock
 CODE_OF_CONDUCT\.md
 DISCLAIMER-WIP
 LICENSES
diff --git a/Makefile b/Makefile
index 24be6de..b2045bd 100644
--- a/Makefile
+++ b/Makefile
@@ -37,22 +37,22 @@ all: build
 
 .PHONY: build
 build:
-	@yarn
+	@npm install
 
 .PHONY: clean
 clean:
-	@yarn run clean
+	@npm run clean
 
 .PHONY: check
 check: lint test
 
 .PHONY: lint
 lint: build
-	@yarn lint
+	@npm run lint
 
 .PHONY: test
 test: build
-	@yarn test
+	@npm run test
 
 ifeq ($(vsn_tag),)
 
diff --git a/README.md b/README.md
index 5955680..69c3401 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ See documentation on the website: <https://annotator.apache.org/docs/>
 
 ## How to build
 
-Build requirements are [Node.JS](https://nodejs.org/) (>= 16) and [yarn](https://yarnpkg.com) (>= 1.5.0).
+Building Annatator libraries requires [Node.JS](https://nodejs.org/) (>= 16).
 All other dependencies are automatically installed as part of the build.
 
 * `npm run build` -- builds the project
@@ -26,7 +26,7 @@ All other dependencies are automatically installed as part of the build.
 
 # License
 
-This project is available as open source under the terms of the Apache 2.0 License. 
+This project is available as open source under the terms of the Apache 2.0 License.
 For accurate information, please check individual files.
 
 # Disclaimer
diff --git a/lerna.json b/lerna.json
index dfbadf3..d37b642 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,9 +1,5 @@
 {
   "version": "0.3.0",
-  "npmClient": "yarn",
-  "packages": [
-    "packages/*"
-  ],
   "command": {
     "publish": {
       "preDistTag": "dev",
diff --git a/package.json b/package.json
index 30eb50c..747eec1 100644
--- a/package.json
+++ b/package.json
@@ -9,13 +9,11 @@
   },
   "license": "Apache-2.0",
   "author": "Apache Software Foundation",
-  "workspaces": {
-    "packages": [
-      "packages/*"
-    ]
-  },
+  "workspaces": [
+    "packages/*"
+  ],
   "scripts": {
-    "build": "concurrently yarn:build:*",
+    "build": "concurrently npm:build:*",
     "build:js": "lerna exec --parallel -- babel -d lib -s -x .ts --env-name production --root-mode upward src",
     "build:misc": "lerna exec --parallel -- shx cp ../../DISCLAIMER-WIP ../../LICENSE ../../NOTICE ../../README.md .",
     "build:types": "tsc --build",
@@ -23,10 +21,10 @@
     "docs": "tsc --build && typedoc",
     "lint": "eslint .",
     "prepare": "is-ci || shx test -d .git || exit 0 && husky install",
-    "prepublishOnly": "yarn run build",
+    "prepublishOnly": "npm run build",
     "publish": "lerna publish",
-    "publish:ci": "yarn run publish --canary --exact --force-publish '*' --no-verify-access --yes minor",
-    "start": "yarn run web:server",
+    "publish:ci": "npm run publish --canary --exact --force-publish '*' --no-verify-access --yes minor",
+    "start": "npm run web:server",
     "test": "cross-env BABEL_ENV=test c8 -a -r html -r text mocha packages/**/*.test.ts",
     "test:watch": "cross-env BABEL_ENV=test mocha -p -w packages/**/*.test.ts",
     "validate": "cross-env BABEL_ENV=test mocha test/**/*.test.ts",
@@ -80,7 +78,6 @@
     "webpack-dev-server": "^4.15.1"
   },
   "engines": {
-    "node": ">=18",
-    "yarn": "^1.5.0"
+    "node": ">=18"
   }
 }