Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monorepo hoist&local deps #2

Open
trydofor opened this issue Apr 3, 2024 · 3 comments
Open

monorepo hoist&local deps #2

trydofor opened this issue Apr 3, 2024 · 3 comments
Labels
deps :package: a dependency file

Comments

@trydofor
Copy link
Owner

trydofor commented Apr 3, 2024

  • package.json
@trydofor trydofor converted this from a draft issue Apr 3, 2024
@trydofor trydofor moved this from 📋 Backlog to 🔖 Ready in WingsBoot Backlog Apr 3, 2024
@trydofor trydofor moved this from 🔖 Ready to 🏗 In progress in WingsBoot Backlog Apr 3, 2024
@trydofor
Copy link
Owner Author

trydofor commented Apr 3, 2024

2.1. hoist dependencies

hoist dependencies from workspaces to top package.json. just copy shared dependencies to top package.json (not move from worksapce to top, keep them both), leave individual dependencies alone.

"dependencies": {
  "@capacitor/app": "5.0.7",
  "@capacitor/core": "5.7.4",
  "@capacitor/haptics": "5.0.7",
  "@capacitor/keyboard": "5.0.8",
  "@capacitor/status-bar": "5.0.7",
  "@ionic/vue": "^7.0.0",
  "@ionic/vue-router": "^7.0.0",
  "ionicons": "^7.0.0",
  "vue": "^3.3.0",
  "vue-router": "^4.2.0"
},
"devDependencies": {
  "@capacitor/cli": "5.7.4",
  "@vitejs/plugin-legacy": "^5.0.0",
  "@vitejs/plugin-vue": "^4.0.0",
  "@vue/eslint-config-typescript": "^12.0.0",
  "@vue/test-utils": "^2.3.0",
  "cypress": "^13.5.0",
  "eslint": "^8.35.0",
  "eslint-plugin-vue": "^9.9.0",
  "jsdom": "^22.1.0",
  "terser": "^5.4.0",
  "typescript": "^5.1.6",
  "vite": "^5.0.0",
  "vitest": "^0.34.6",
  "vue-tsc": "^1.0.24"
}

then, modify and reorder version,description in all package.json.

## at top project, install and check
npm install
##> added 702 packages, and removed 1474 packages in 37s
## move shared deps, for workspace `node_modules` to top's 

cd packages/front-desktop 
npx cap open @capacitor-community/electron
##> Opening Electron platform: running electron app

## save point
git add --all && git commit -am '2.1 hoist deps #2'

@trydofor
Copy link
Owner Author

trydofor commented Apr 3, 2024

build electron

TS2411: Property '"accept-charset"' of type 'string | string[]'
is not assignable to 'string' index type 'string'.

add skipLibCheck

{
  "compilerOptions": {
    "skipLibCheck": true
  }
}

Cannot detect repository by .git/config. Please specify "repository" in the package.json
Please see https://electron.build/configuration/publish

delete publish

  "publish": {
    "provider": "github"
  },

@trydofor trydofor added the deps :package: a dependency file label Apr 3, 2024
trydofor added a commit that referenced this issue Apr 3, 2024
trydofor added a commit that referenced this issue Apr 3, 2024
@trydofor trydofor moved this from 🏗 In progress to 👀 In review in WingsBoot Backlog Apr 7, 2024
@trydofor
Copy link
Owner Author

trydofor commented Apr 7, 2024

install local monorepo

npm install @razor/shared --workspace packages/front-shared
npm install @razor/front-shared --workspace packages/front-desktop
npm install @razor/front-shared --workspace packages/front-mobile

and use file:../ instead of local snapshot version

- "@razor/front-shared": "1.0.0-beta.100",
+ "@razor/front-shared": "file:../front-shared",
- "@razor/shared": "1.0.0-beta.100",
+ "@razor/shared": "file:../shared",

trydofor added a commit that referenced this issue Apr 7, 2024
@trydofor trydofor changed the title monorepo hoist deps, conf monorepo hoist&local deps Apr 7, 2024
@trydofor trydofor moved this from 👀 In review to ✅ Done in WingsBoot Backlog Apr 7, 2024
trydofor added a commit that referenced this issue Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps :package: a dependency file
Projects
Archived in project
Development

No branches or pull requests

1 participant