Commit 1a368959 authored by Daniel Lindh's avatar Daniel Lindh 🤠
Browse files

@lpgroup/yup sync with monorepo root

parent 723c6cc6
......@@ -13,3 +13,5 @@
"quotes": ["error", "double"]
}
}
node_modules
# Dependency directories
node_modules/
jspm_packages/
# Coverage directory used by tools like istanbul
coverage
# OS X
.DS_Store
#
.eslintcache
lerna-debug.log
.npmrc
\ No newline at end of file
#
.npmrc
......@@ -39,3 +39,49 @@ https://github.com/mitterio/js-sdk/tree/master/packages/core
npm install --global lerna yarn npx
yarn install
lerna bootstrap
https://doppelmutzi.github.io/monorepo-lerna-yarn-workspaces/
https://medium.com/mitterio/multirepo-to-lerna-js-monorepo-80f6657cb443
https://github.com/mitterio/js-sdk/tree/master/packages/core
npm install --global lerna yarn npx
yarn install
lerna bootstrap
lerna version --force-publish
https://github.com/lerna/lerna/tree/main/commands/version
# Developer Flow
- Create a ticket on Trello
- Creates a new branch or fork for the issue
- Merges the changes to master after a code review
- When a milestone is completed create a new release.
yarn
yarn test
# Lerna changes the versions of the packages
# Creates a tag in the remote repo,
# pushes the changes to GitLab.
# Gitlab ci/cd will build and push to npmjs.
yarn set-version
## Helper commands
```yarn workspaces info````
Display the workspace dependency tree of your current project.
```yarn workspace @lpgroup/yup lint````
Run specific command in a specific workspace
`yarn workspace @lpgroup/yup add eslint --dev`
Adding a dev dependency to a workspace
```yarn add eslint --dev -W````
Add dependency to all workspaces
`yarn workspace @lpgroup/feathers-auth-service add @lpgroup/yup@1.1.0 -D`
Adding a local dependency to a local workspace
find . -type f -name '.editorconfig'
#!/bin/bash
find . -type f -name 'yarn.lock' -exec rm {} +
find . -type f -name 'package-lock.json' -exec rm {} +
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
\ No newline at end of file
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name "coverage" -type d -prune -exec rm -rf '{}' +
{
"name": "@lpgroup/lpgroup",
"version": "1.1.0",
"version": "0.0.0",
"description": "Mono repo of several lpgroup npms",
"author": "daniel@cybercow.se",
"license": "MIT",
"private": true,
"workspaces": [
"packages/*"
],
"jest": {
"testEnvironment": "node",
"coveragePathIgnorePatterns": [
"/node_modules/"
]
},
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/react-native"
]
},
"scripts": {
"cleanup": "./bin/cleanup.sh",
"build:doppelmutzi": "lerna run --scope=@doppelmutzi/* build"
"test": "lerna run test",
"lint": "lerna run lint",
"jest": "lerna run jest",
"prettier": "lerna run prettier",
"lint:all": "eslint . --cache --ext js,jsx,ts,tsx,md",
"set-version": "lerna version --force-publish",
"build:doppelmutzi": "lerna run --scope=@doppelmutzi/* build",
"sync-dependencies": "syncpack"
},
"devDependencies": {
"lerna": "^3.22.1"
}
"eslint": "^7.13.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"jest": "^26.6.3",
"lerna": "^3.22.1",
"syncpack": "^5.6.10",
"prettier": "^2.1.2",
"nodemon": "^2.0.6"
},
"dependencies": {}
}
# Dependency directories
node_modules/
jspm_packages/
# Coverage directory used by tools like istanbul
coverage
# OS X
.DS_Store
image: node:12
variables:
DEBUG: "yup"
stages:
- deploy
deploy_master:
stage: deploy
script:
- echo "//gitlab.com/api/v4/packages/npm/:_authToken=\${CI_JOB_TOKEN}" >> .npmrc
- echo "//gitlab.com/api/v4/projects/\${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}" >> .npmrc
- npm ci
- npm run test
- npm publish
artifacts:
paths:
- /root/.npm/_logs/
expire_in: 1 week
only:
- master
deploy_develop:
stage: deploy
script:
- echo "//gitlab.com/api/v4/packages/npm/:_authToken=\${CI_JOB_TOKEN}" >> .npmrc
- echo "//gitlab.com/api/v4/projects/\${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}" >> .npmrc
- npm ci
- npm run test
only:
- develop
test
.gitlab-ci.yml
.eslintrc.json
.editorconfig
.nvmrc
.vscode
jest.env
patches
......
{
"name": "@lpgroup/yup",
"version": "1.1.0",
"description": "Collection of yup validation functions.",
"license": "MIT",
"version": "1.1.0",
"homepage": "https://gitlab.com/lpgroup/yup",
"main": "src",
"keywords": [
"lpgroup",
"yup"
],
"author": {
"name": "Daniel Lindh",
"email": "daniel@cybercow.se"
},
"contributors": [
"daniel@cybercow.se"
],
"bugs": {
"url": "https://gitlab.com/lpgroup/yup/-/issues"
},
......@@ -27,29 +20,13 @@
"lib": "src",
"test": "test"
},
"engines": {
"node": "^12.19",
"npm": ">= 6.14.8"
},
"jest": {
"testEnvironment": "node",
"coveragePathIgnorePatterns": [
"/node_modules/"
]
},
"scripts": {
"test": "npm run lint && npm run jest",
"lint": "eslint src/. test/. --config .eslintrc.json --fix",
"jest": "jest --coverage --detectOpenHandles",
"test": "yarn lint && yarn jest",
"lint": "eslint src/. test/. --config ../../.eslintrc.json --fix",
"jest": "jest --coverage",
"prettier": "prettier --write \"./**/*.{js,jsx,json}\"",
"patch-package": "patch-package"
},
"standard": {
"env": [
"jest"
],
"ignore": []
},
"peerDependencies": {
"@feathersjs/errors": "^4.5.10"
},
......@@ -62,12 +39,7 @@
},
"devDependencies": {
"@feathersjs/errors": "^4.5.10",
"eslint": "^7.2.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"jest": "^26.6.3",
"patch-package": "^6.2.2",
"prettier": "^2.0.5"
"patch-package": "^6.2.2"
},
"publishConfig": {
"access": "public"
......
B# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment