From 9bbec3f423a7dfcb83d1e71200fcc17bac3bba8e Mon Sep 17 00:00:00 2001 From: Aleksi O'Connor Date: Wed, 19 Oct 2022 13:36:01 +0300 Subject: [PATCH 1/3] add cross-env to support environment variables accross all platforms --- package.json | 5 +++-- yarn.lock | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f8435c50fa..251ba50723 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "bfj": "^7.0.2", "chalk": "^v4.1.2", "concurrently": "^7.2.0", + "cross-env": "^7.0.3", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.6", "enzyme-to-json": "^3.6.2", @@ -91,7 +92,7 @@ "config-check": "node scripts/config.js --check", "dev-frontend": "sharetribe-scripts start", "dev-backend": "nodemon server/apiServer.js", - "dev": "yarn run config-check&&export NODE_ENV=development REACT_APP_DEV_API_SERVER_PORT=3500&&concurrently --kill-others \"yarn run dev-frontend\" \"yarn run dev-backend\"", + "dev": "yarn run config-check&&cross-env NODE_ENV=development REACT_APP_DEV_API_SERVER_PORT=3500 concurrently --kill-others \"yarn run dev-frontend\" \"yarn run dev-backend\"", "build": "yarn build-web&&yarn build-server", "build-web": "sharetribe-scripts build", "build-server": "sharetribe-scripts build-server", @@ -102,7 +103,7 @@ "test-ci": "yarn run test-server --runInBand && sharetribe-scripts test --runInBand", "eject": "sharetribe-scripts eject", "start": "node --icu-data-dir=node_modules/full-icu server/index.js", - "dev-server": "export NODE_ENV=development PORT=4000 REACT_APP_CANONICAL_ROOT_URL=http://localhost:4000&&yarn run build&&nodemon --watch server server/index.js", + "dev-server": "cross-env-shell NODE_ENV=development PORT=4000 REACT_APP_CANONICAL_ROOT_URL=http://localhost:4000 \"yarn build-web&&yarn build-server&&nodemon --watch server server/index.js\"", "test-server": "jest ./server/**/*.test.js", "heroku-postbuild": "yarn run build", "translate": "node scripts/translations.js" diff --git a/yarn.lock b/yarn.lock index e55fbc33b6..50f000e50c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4819,7 +4819,14 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + +cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== From c3d0ebaa51e964d727102be5a0ca78536c38ce98 Mon Sep 17 00:00:00 2001 From: Aleksi O'Connor Date: Mon, 24 Oct 2022 11:15:44 +0300 Subject: [PATCH 2/3] shorten dev-server command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 251ba50723..d0aa8e633e 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "test-ci": "yarn run test-server --runInBand && sharetribe-scripts test --runInBand", "eject": "sharetribe-scripts eject", "start": "node --icu-data-dir=node_modules/full-icu server/index.js", - "dev-server": "cross-env-shell NODE_ENV=development PORT=4000 REACT_APP_CANONICAL_ROOT_URL=http://localhost:4000 \"yarn build-web&&yarn build-server&&nodemon --watch server server/index.js\"", + "dev-server": "cross-env-shell NODE_ENV=development PORT=4000 REACT_APP_CANONICAL_ROOT_URL=http://localhost:4000 \"yarn run build&&nodemon --watch server server/index.js\"", "test-server": "jest ./server/**/*.test.js", "heroku-postbuild": "yarn run build", "translate": "node scripts/translations.js" From ea3ada3e551bd31bc8d833ad6ab43ef326a9e57d Mon Sep 17 00:00:00 2001 From: Aleksi O'Connor Date: Tue, 15 Nov 2022 15:42:35 +0200 Subject: [PATCH 3/3] add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bedc5cf489..9d9eb9d680 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2022-XX-XX +- Add the cross-env package to better support Windows command prompts + ## [v9.0.2] 2022-10-17 - [change] Add links to free Privacy Policy and Terms of Service templates