From 22a6863c1b4a5d9c6c026c502a1b77dded318be7 Mon Sep 17 00:00:00 2001 From: Celso Octaviano De Carvalho <64174170+CelsoDeCarvalho@users.noreply.github.com> Date: Mon, 21 Aug 2023 19:41:04 +0200 Subject: [PATCH 1/2] fix: support yarn.lock discovery on non-unix (#811) Fixes an issue which manifested as "maximum call stack size exceeded at paths.js (findYarnLock function)" --- cli/src/lib/paths.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/src/lib/paths.js b/cli/src/lib/paths.js index 4f6be61ab..59aa52e6f 100644 --- a/cli/src/lib/paths.js +++ b/cli/src/lib/paths.js @@ -7,20 +7,20 @@ const shellSource = path.dirname( ) const shellAppDirname = 'src/D2App' -const findYarnLock = (base) => { - if (base === '/') { +const findYarnLock = (base, rootDirectory) => { + if (base === rootDirectory) { return null } - const yarnLock = path.join(base, './yarn.lock') if (fs.existsSync(yarnLock)) { return yarnLock } - return findYarnLock(path.dirname(base)) + return findYarnLock(path.dirname(base), rootDirectory) } module.exports = (cwd = process.cwd()) => { const base = path.resolve(cwd) + const rootDirectory = path.parse(cwd).root const paths = { babelConfig: path.join(__dirname, '../../config/babel.config.js'), configDefaultsApp: path.join( @@ -44,7 +44,7 @@ module.exports = (cwd = process.cwd()) => { base, package: path.join(base, './package.json'), - yarnLock: findYarnLock(base), + yarnLock: findYarnLock(base, rootDirectory), dotenv: path.join(base, './.env'), config: path.join(base, './d2.config.js'), readme: path.join(base, './README.md'), From 06cee5763d314322c58adfebb7a8cb5b2e2f9124 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Mon, 21 Aug 2023 17:50:02 +0000 Subject: [PATCH 2/2] chore(release): cut 10.3.10 [skip release] ## [10.3.10](https://github.com/dhis2/app-platform/compare/v10.3.9...v10.3.10) (2023-08-21) ### Bug Fixes * support yarn.lock discovery on non-unix ([#811](https://github.com/dhis2/app-platform/issues/811)) ([22a6863](https://github.com/dhis2/app-platform/commit/22a6863c1b4a5d9c6c026c502a1b77dded318be7)) --- CHANGELOG.md | 7 +++++++ adapter/package.json | 6 +++--- cli/package.json | 4 ++-- examples/pwa-app/package.json | 2 +- examples/simple-app/package.json | 2 +- package.json | 2 +- pwa/package.json | 4 ++-- shell/package.json | 6 +++--- 8 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ee90560e..3b1fd04a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [10.3.10](https://github.com/dhis2/app-platform/compare/v10.3.9...v10.3.10) (2023-08-21) + + +### Bug Fixes + +* support yarn.lock discovery on non-unix ([#811](https://github.com/dhis2/app-platform/issues/811)) ([22a6863](https://github.com/dhis2/app-platform/commit/22a6863c1b4a5d9c6c026c502a1b77dded318be7)) + ## [10.3.9](https://github.com/dhis2/app-platform/compare/v10.3.8...v10.3.9) (2023-05-16) diff --git a/adapter/package.json b/adapter/package.json index 8ed9155ec..02629422f 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-adapter", - "version": "10.3.9", + "version": "10.3.10", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -21,11 +21,11 @@ "build" ], "dependencies": { - "@dhis2/pwa": "10.3.9", + "@dhis2/pwa": "10.3.10", "moment": "^2.24.0" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.3.9", + "@dhis2/cli-app-scripts": "10.3.10", "@testing-library/react": "^12.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/cli/package.json b/cli/package.json index 0829870c2..38d23ce38 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/cli-app-scripts", - "version": "10.3.9", + "version": "10.3.10", "engines": { "node": ">=14" }, @@ -28,7 +28,7 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", - "@dhis2/app-shell": "10.3.9", + "@dhis2/app-shell": "10.3.10", "@dhis2/cli-helpers-engine": "^3.2.0", "@jest/core": "^27.0.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index da1e72a07..ca7f2336c 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -1,6 +1,6 @@ { "name": "pwa-app", - "version": "10.3.9", + "version": "10.3.10", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/examples/simple-app/package.json b/examples/simple-app/package.json index 21429cd80..3336b8d62 100644 --- a/examples/simple-app/package.json +++ b/examples/simple-app/package.json @@ -1,6 +1,6 @@ { "name": "simple-app", - "version": "10.3.9", + "version": "10.3.10", "repository": "https://github.com/amcgee/dhis2-app-platform", "author": "Austin McGee ", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index 64d4b697a..47dc55b46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "10.3.9", + "version": "10.3.10", "private": true, "repository": { "type": "git", diff --git a/pwa/package.json b/pwa/package.json index c9546477f..7ea015a74 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/pwa", - "version": "10.3.9", + "version": "10.3.10", "description": "", "license": "BSD-3-Clause", "publishConfig": { @@ -13,7 +13,7 @@ "deploy": "d2-app-scripts deploy" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.3.9" + "@dhis2/cli-app-scripts": "10.3.10" }, "dependencies": { "idb": "^6.0.0", diff --git a/shell/package.json b/shell/package.json index 14147d0fb..62f5bfe30 100644 --- a/shell/package.json +++ b/shell/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-shell", - "version": "10.3.9", + "version": "10.3.10", "engines": { "node": ">=14" }, @@ -15,10 +15,10 @@ "access": "public" }, "dependencies": { - "@dhis2/app-adapter": "10.3.9", + "@dhis2/app-adapter": "10.3.10", "@dhis2/app-runtime": "^3.9.0", "@dhis2/d2-i18n": "^1.1.1", - "@dhis2/pwa": "10.3.9", + "@dhis2/pwa": "10.3.10", "@dhis2/ui": "^8.12.3", "classnames": "^2.2.6", "moment": "^2.29.1",