Skip to content

Commit

Permalink
Move to monorepo
Browse files Browse the repository at this point in the history
Fix matrix

fix node version

Run only repluggable

Downgrade yarn

bla

bla2

bla3

pr.yml

pr.ym2l

run registry

npmrc

release
  • Loading branch information
DanielKag committed Jan 28, 2025
1 parent c0418a2 commit 4c7b641
Show file tree
Hide file tree
Showing 66 changed files with 186 additions and 71 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,22 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 20
- run: yarn
- run: yarn build
- run: yarn test
- name: Install dependencies
run: yarn install

- name: Build package
run: |
cd packages/repluggable
yarn build
- name: Run tests
run: |
cd packages/repluggable
yarn test
- name: Bump version
run: |
cd packages/repluggable
git reset --hard
echo yarn version "0.0.0-pr$PR_ID.$BUILD_NUMBER"
yarn version "0.0.0-pr$PR_ID.$BUILD_NUMBER"
Expand All @@ -30,8 +40,8 @@ jobs:

- name: npm publish
run: |
cd packages/repluggable
echo PR package tag is [pr$PR_ID.$BUILD_NUMBER]
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
npm publish --tag "pr$PR_ID.$BUILD_NUMBER"
env:
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
yarnVersionArgs:
description: 'Arguments for "yarn version"'
required: true
default: '--patch'
default: 'patch'

jobs:
publish:
Expand All @@ -29,11 +29,11 @@ jobs:
env:
GH_EMAIL: ${{secrets.GH_EMAIL}}
GH_USER: ${{secrets.GH_USER}}

- name: Bump version
run: |
git reset --hard
yarn version --no-git-tag-version ${{ github.event.inputs.yarnVersionArgs }}
yarn version ${{ github.event.inputs.yarnVersionArgs }}
export NEW_RELEASE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
echo New Release Version is: [$NEW_RELEASE_VERSION]
yarn build
Expand All @@ -45,7 +45,7 @@ jobs:
git push "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY" --tags
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: npm publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 0 additions & 1 deletion .yarnversion

This file was deleted.

74 changes: 14 additions & 60 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"name": "repluggable",
"version": "1.302.60",
"name": "repluggable-monorepo",
"version": "1.0.0",
"license": "MIT",
"description": "Allows composition of a React-with-Redux application entirely from a list of pluggable packages",
"main": "dist/src/index.js",
"module": "dist/es/src/index.js",
"unpkg": true,
"author": {
"name": "Wix.com",
"email": "[email protected]"
Expand All @@ -14,63 +11,19 @@
"type": "git",
"url": "https://github.com/wix/repluggable"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"versionBumpStrategy": "patch"
},
"files": [
"*"
"workspaces": [
"packages/*"
],
"scripts": {
"start": "webpack-dev-server --hot --config webpack.local.config.js",
"build": "rm -rf dist && yarn build-cjs && yarn build-es && yarn build-bundle-dev && yarn build-bundle-prod",
"build-cjs": "tsc --outDir dist --module commonjs",
"build-es": "tsc --outDir dist/es --module esNext",
"build-bundle-dev": "webpack --config webpack.dev.config.js",
"build-bundle-prod": "webpack --config webpack.prod.config.js",
"test": "jest --coverage",
"posttest": "tslint --project .",
"lintfix": "tslint --fix --project ."
},
"dependencies": {
"react-test-renderer": "^18.0.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"tslib": "^2.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.15",
"@types/lodash": "^4.14.162",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react-test-renderer": "^18.0.0",
"@types/webpack-env": "^1.15.3",
"case-sensitive-paths-webpack-plugin": "^2.3.0",
"husky": "^4.3.0",
"jest": "^26.6.0",
"jest-teamcity-reporter": "^0.9.0",
"lint-staged": "^10.4.2",
"lodash": "^4.17.20",
"prettier": "^2.1.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-redux": "^8.0.0",
"terser-webpack-plugin": "^4.1.0",
"ts-jest": "^26.4.1",
"ts-loader": "^8.0.6",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-consistent-codestyle": "^1.16.0",
"tslint-eslint-rules": "^5.4.0",
"tslint-microsoft-contrib": "^6.2.0",
"tslint-no-unused-expression-chai": "^0.1.4",
"tslint-plugin-prettier": "^2.3.0",
"tslint-react": "^5.0.0",
"tslint-react-hooks": "^2.2.2",
"typescript": "^5.4.2",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
"start": "yarn workspace repluggable start",
"build": "yarn workspace repluggable build",
"build-cjs": "yarn workspace repluggable build-cjs",
"build-es": "yarn workspace repluggable build-es",
"build-bundle-dev": "yarn workspace repluggable build-bundle-dev",
"build-bundle-prod": "yarn workspace repluggable build-bundle-prod",
"test": "yarn workspace repluggable test",
"posttest": "yarn workspace repluggable posttest",
"lintfix": "yarn workspace repluggable lintfix"
},
"resolutions": {
"node-forge": "^1.0.0"
Expand All @@ -87,3 +40,4 @@
},
"packageManager": "[email protected]"
}

24 changes: 24 additions & 0 deletions packages/repluggable-core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "repluggable-core",
"version": "1.0.0",
"license": "MIT",
"description": "Allows composition of a React-with-Redux application entirely from a list of pluggable packages",
"main": "src/index.js",
"unpkg": true,
"author": {
"name": "Wix.com",
"email": "[email protected]"
},
"scripts": {
"build": "echo build core...",
"test": "echo test core..."
},
"repository": {
"type": "git",
"url": "https://github.com/wix/repluggable"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"versionBumpStrategy": "patch"
}
}
1 change: 1 addition & 0 deletions packages/repluggable-core/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const x = 1
File renamed without changes.
File renamed without changes.
89 changes: 89 additions & 0 deletions packages/repluggable/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"name": "repluggable",
"version": "1.302.60",
"license": "MIT",
"description": "Allows composition of a React-with-Redux application entirely from a list of pluggable packages",
"main": "dist/src/index.js",
"module": "dist/es/src/index.js",
"unpkg": true,
"author": {
"name": "Wix.com",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "https://github.com/wix/repluggable"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"versionBumpStrategy": "patch"
},
"files": [
"*"
],
"scripts": {
"start": "webpack-dev-server --hot --config webpack.local.config.js",
"build": "rm -rf dist && yarn build-cjs && yarn build-es && yarn build-bundle-dev && yarn build-bundle-prod",
"build-cjs": "tsc --outDir dist --module commonjs",
"build-es": "tsc --outDir dist/es --module esNext",
"build-bundle-dev": "webpack --config webpack.dev.config.js",
"build-bundle-prod": "webpack --config webpack.prod.config.js",
"test": "jest --coverage",
"posttest": "tslint --project .",
"lintfix": "tslint --fix --project ."
},
"dependencies": {
"react-test-renderer": "^18.0.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"tslib": "^2.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.15",
"@types/lodash": "^4.14.162",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react-test-renderer": "^18.0.0",
"@types/webpack-env": "^1.15.3",
"case-sensitive-paths-webpack-plugin": "^2.3.0",
"husky": "^4.3.0",
"jest": "^26.6.0",
"jest-teamcity-reporter": "^0.9.0",
"lint-staged": "^10.4.2",
"lodash": "^4.17.20",
"prettier": "^2.1.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-redux": "^8.0.0",
"terser-webpack-plugin": "^4.1.0",
"ts-jest": "^26.4.1",
"ts-loader": "^8.0.6",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-consistent-codestyle": "^1.16.0",
"tslint-eslint-rules": "^5.4.0",
"tslint-microsoft-contrib": "^6.2.0",
"tslint-no-unused-expression-chai": "^0.1.4",
"tslint-plugin-prettier": "^2.3.0",
"tslint-react": "^5.0.0",
"tslint-react-hooks": "^2.2.2",
"typescript": "^5.4.2",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
},
"resolutions": {
"node-forge": "^1.0.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"(src|test|testKit)/**/*.{ts,tsx}": [
"tslint --project . --fix"
]
},
"packageManager": "[email protected]"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions packages/repluggable/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "ES6",
"module": "esnext",
"moduleResolution": "node",
"lib": ["dom", "esnext"],
"jsx": "react",
"declaration": true,
"declarationMap": true,
"noUnusedLocals": true,
"sourceMap": true,
"strict": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"allowUnreachableCode": false,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"useUnknownInCatchVariables": false
},
"include": [
"src",
"test",
"testKit"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 14 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7557,9 +7557,21 @@ __metadata:
languageName: node
linkType: hard

"repluggable@workspace:.":
"repluggable-core@workspace:packages/repluggable-core":
version: 0.0.0-use.local
resolution: "repluggable@workspace:."
resolution: "repluggable-core@workspace:packages/repluggable-core"
languageName: unknown
linkType: soft

"repluggable-monorepo@workspace:.":
version: 0.0.0-use.local
resolution: "repluggable-monorepo@workspace:."
languageName: unknown
linkType: soft

"repluggable@workspace:packages/repluggable":
version: 0.0.0-use.local
resolution: "repluggable@workspace:packages/repluggable"
dependencies:
"@types/jest": "npm:^26.0.15"
"@types/lodash": "npm:^4.14.162"
Expand Down

0 comments on commit 4c7b641

Please sign in to comment.