From a5c2ddee1f4f3c0f4d83aeed6368b5f8fa4bd167 Mon Sep 17 00:00:00 2001 From: Daniel Kagan Date: Sun, 26 Jan 2025 16:03:24 +0200 Subject: [PATCH 1/3] Move to monorepo Fix matrix fix node version Run only repluggable Downgrade yarn bla bla2 bla3 pr.yml pr.ym2l run registry npmrc release --- .github/workflows/pr.yml | 18 +++- .github/workflows/release.yml | 2 +- .npmrc | 1 + .yarnversion | 1 - package.json | 74 +++------------ packages/repluggable-core/package.json | 24 +++++ packages/repluggable-core/src/index.js | 1 + .../repluggable/__tests__}/spec-setup.js | 0 .../repluggable/jest.config.js | 0 packages/repluggable/package.json | 89 +++++++++++++++++++ {src => packages/repluggable/src}/API.ts | 0 .../repluggable/src}/IterableWeakMap.ts | 0 {src => packages/repluggable/src}/appHost.tsx | 0 .../repluggable/src}/appHostServices.ts | 0 .../repluggable/src}/appHostUtils.ts | 0 .../repluggable/src}/appMainView.tsx | 0 .../repluggable/src}/connectWithShell.tsx | 0 .../repluggable/src}/errorBoundary.tsx | 0 .../repluggable/src}/extensionSlot.ts | 0 {src => packages/repluggable/src}/hot.ts | 0 {src => packages/repluggable/src}/index.ts | 0 .../repluggable/src}/installedShellsState.ts | 0 .../repluggable/src}/interceptAnyObject.ts | 0 .../repluggable/src}/interceptEntryPoints.ts | 0 .../repluggable/src}/invokeSlotCallbacks.ts | 0 {src => packages/repluggable/src}/loggers.ts | 0 .../repluggable/src}/monitorAPI.ts | 0 .../repluggable/src}/propsDeepEqual.tsx | 0 .../repluggable/src}/renderSlotComponents.tsx | 0 .../src}/repluggableAppDebug/debug.d.ts | 0 .../src}/repluggableAppDebug/index.ts | 0 .../performanceDebugInfo.ts | 0 .../repluggableAppDebug.ts | 0 .../repluggable/src}/shellContext.ts | 0 .../repluggable/src}/storeContext.ts | 0 .../repluggable/src}/tarjanGraph.ts | 0 .../repluggable/src}/throttledStore.tsx | 0 .../repluggable/test}/IterableWeakMap.spec.ts | 0 .../repluggable/test}/appHost.mock.ts | 0 .../repluggable/test}/appHost.spec.ts | 0 .../test}/connectWithShell.spec.tsx | 0 .../test}/customExtensionSlot.spec.ts | 0 .../repluggable/test}/errorBoundary.spec.tsx | 0 .../repluggable/test}/extensionSlot.spec.ts | 0 .../test}/installedShellsState.spec.ts | 0 .../test}/interceptAnyObject.spec.ts | 0 .../test}/interceptEntryPoints.spec.ts | 0 .../repluggable/test}/loggers.spec.ts | 0 .../repluggable/test}/propsDeepEqual.spec.tsx | 0 .../test}/renderSlotComponents.spec.tsx | 0 .../test}/repluggableAppDebug.spec.ts | 0 .../repluggable/test}/testKit.spec.tsx | 0 .../repluggable/test}/tryTypings.ts | 0 .../testKit}/emptyLoggerOptions.ts | 0 .../repluggable/testKit}/index.tsx | 0 .../repluggable/testKit}/mockPackage.ts | 0 .../repluggable/testKit}/package.json | 0 .../repluggable/testKit}/withConsoleErrors.ts | 0 .../repluggable/testKit}/withThrowOnError.ts | 0 packages/repluggable/tsconfig.json | 25 ++++++ .../repluggable/webpack.base.config.js | 0 .../repluggable/webpack.dev.config.js | 0 .../repluggable/webpack.local.config.js | 0 .../repluggable/webpack.prod.config.js | 0 yarn.lock | 16 +++- 65 files changed, 183 insertions(+), 68 deletions(-) create mode 100644 .npmrc delete mode 100644 .yarnversion create mode 100644 packages/repluggable-core/package.json create mode 100644 packages/repluggable-core/src/index.js rename {__tests__ => packages/repluggable/__tests__}/spec-setup.js (100%) rename jest.config.js => packages/repluggable/jest.config.js (100%) create mode 100644 packages/repluggable/package.json rename {src => packages/repluggable/src}/API.ts (100%) rename {src => packages/repluggable/src}/IterableWeakMap.ts (100%) rename {src => packages/repluggable/src}/appHost.tsx (100%) rename {src => packages/repluggable/src}/appHostServices.ts (100%) rename {src => packages/repluggable/src}/appHostUtils.ts (100%) rename {src => packages/repluggable/src}/appMainView.tsx (100%) rename {src => packages/repluggable/src}/connectWithShell.tsx (100%) rename {src => packages/repluggable/src}/errorBoundary.tsx (100%) rename {src => packages/repluggable/src}/extensionSlot.ts (100%) rename {src => packages/repluggable/src}/hot.ts (100%) rename {src => packages/repluggable/src}/index.ts (100%) rename {src => packages/repluggable/src}/installedShellsState.ts (100%) rename {src => packages/repluggable/src}/interceptAnyObject.ts (100%) rename {src => packages/repluggable/src}/interceptEntryPoints.ts (100%) rename {src => packages/repluggable/src}/invokeSlotCallbacks.ts (100%) rename {src => packages/repluggable/src}/loggers.ts (100%) rename {src => packages/repluggable/src}/monitorAPI.ts (100%) rename {src => packages/repluggable/src}/propsDeepEqual.tsx (100%) rename {src => packages/repluggable/src}/renderSlotComponents.tsx (100%) rename {src => packages/repluggable/src}/repluggableAppDebug/debug.d.ts (100%) rename {src => packages/repluggable/src}/repluggableAppDebug/index.ts (100%) rename {src => packages/repluggable/src}/repluggableAppDebug/performanceDebugInfo.ts (100%) rename {src => packages/repluggable/src}/repluggableAppDebug/repluggableAppDebug.ts (100%) rename {src => packages/repluggable/src}/shellContext.ts (100%) rename {src => packages/repluggable/src}/storeContext.ts (100%) rename {src => packages/repluggable/src}/tarjanGraph.ts (100%) rename {src => packages/repluggable/src}/throttledStore.tsx (100%) rename {test => packages/repluggable/test}/IterableWeakMap.spec.ts (100%) rename {test => packages/repluggable/test}/appHost.mock.ts (100%) rename {test => packages/repluggable/test}/appHost.spec.ts (100%) rename {test => packages/repluggable/test}/connectWithShell.spec.tsx (100%) rename {test => packages/repluggable/test}/customExtensionSlot.spec.ts (100%) rename {test => packages/repluggable/test}/errorBoundary.spec.tsx (100%) rename {test => packages/repluggable/test}/extensionSlot.spec.ts (100%) rename {test => packages/repluggable/test}/installedShellsState.spec.ts (100%) rename {test => packages/repluggable/test}/interceptAnyObject.spec.ts (100%) rename {test => packages/repluggable/test}/interceptEntryPoints.spec.ts (100%) rename {test => packages/repluggable/test}/loggers.spec.ts (100%) rename {test => packages/repluggable/test}/propsDeepEqual.spec.tsx (100%) rename {test => packages/repluggable/test}/renderSlotComponents.spec.tsx (100%) rename {test => packages/repluggable/test}/repluggableAppDebug.spec.ts (100%) rename {test => packages/repluggable/test}/testKit.spec.tsx (100%) rename {test => packages/repluggable/test}/tryTypings.ts (100%) rename {testKit => packages/repluggable/testKit}/emptyLoggerOptions.ts (100%) rename {testKit => packages/repluggable/testKit}/index.tsx (100%) rename {testKit => packages/repluggable/testKit}/mockPackage.ts (100%) rename {testKit => packages/repluggable/testKit}/package.json (100%) rename {testKit => packages/repluggable/testKit}/withConsoleErrors.ts (100%) rename {testKit => packages/repluggable/testKit}/withThrowOnError.ts (100%) create mode 100644 packages/repluggable/tsconfig.json rename webpack.base.config.js => packages/repluggable/webpack.base.config.js (100%) rename webpack.dev.config.js => packages/repluggable/webpack.dev.config.js (100%) rename webpack.local.config.js => packages/repluggable/webpack.local.config.js (100%) rename webpack.prod.config.js => packages/repluggable/webpack.prod.config.js (100%) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 43b3baec..e9af4e8e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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" @@ -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}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e94d2c25..fd390e5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: yarnVersionArgs: description: 'Arguments for "yarn version"' required: true - default: "patch" + default: 'patch' jobs: publish: diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..fb7f2353 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} diff --git a/.yarnversion b/.yarnversion deleted file mode 100644 index 71f7f51d..00000000 --- a/.yarnversion +++ /dev/null @@ -1 +0,0 @@ -1.22 diff --git a/package.json b/package.json index bd00e77f..348045ff 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,8 @@ { - "name": "repluggable", - "version": "1.302.61", + "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": "responsive-feds@wix.com" @@ -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" @@ -87,3 +40,4 @@ }, "packageManager": "yarn@4.6.0" } + diff --git a/packages/repluggable-core/package.json b/packages/repluggable-core/package.json new file mode 100644 index 00000000..ca179b29 --- /dev/null +++ b/packages/repluggable-core/package.json @@ -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": "responsive-feds@wix.com" + }, + "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" + } +} diff --git a/packages/repluggable-core/src/index.js b/packages/repluggable-core/src/index.js new file mode 100644 index 00000000..45b1160e --- /dev/null +++ b/packages/repluggable-core/src/index.js @@ -0,0 +1 @@ +const x = 1 \ No newline at end of file diff --git a/__tests__/spec-setup.js b/packages/repluggable/__tests__/spec-setup.js similarity index 100% rename from __tests__/spec-setup.js rename to packages/repluggable/__tests__/spec-setup.js diff --git a/jest.config.js b/packages/repluggable/jest.config.js similarity index 100% rename from jest.config.js rename to packages/repluggable/jest.config.js diff --git a/packages/repluggable/package.json b/packages/repluggable/package.json new file mode 100644 index 00000000..c4772aba --- /dev/null +++ b/packages/repluggable/package.json @@ -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": "responsive-feds@wix.com" + }, + "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": "yarn@4.6.0" +} diff --git a/src/API.ts b/packages/repluggable/src/API.ts similarity index 100% rename from src/API.ts rename to packages/repluggable/src/API.ts diff --git a/src/IterableWeakMap.ts b/packages/repluggable/src/IterableWeakMap.ts similarity index 100% rename from src/IterableWeakMap.ts rename to packages/repluggable/src/IterableWeakMap.ts diff --git a/src/appHost.tsx b/packages/repluggable/src/appHost.tsx similarity index 100% rename from src/appHost.tsx rename to packages/repluggable/src/appHost.tsx diff --git a/src/appHostServices.ts b/packages/repluggable/src/appHostServices.ts similarity index 100% rename from src/appHostServices.ts rename to packages/repluggable/src/appHostServices.ts diff --git a/src/appHostUtils.ts b/packages/repluggable/src/appHostUtils.ts similarity index 100% rename from src/appHostUtils.ts rename to packages/repluggable/src/appHostUtils.ts diff --git a/src/appMainView.tsx b/packages/repluggable/src/appMainView.tsx similarity index 100% rename from src/appMainView.tsx rename to packages/repluggable/src/appMainView.tsx diff --git a/src/connectWithShell.tsx b/packages/repluggable/src/connectWithShell.tsx similarity index 100% rename from src/connectWithShell.tsx rename to packages/repluggable/src/connectWithShell.tsx diff --git a/src/errorBoundary.tsx b/packages/repluggable/src/errorBoundary.tsx similarity index 100% rename from src/errorBoundary.tsx rename to packages/repluggable/src/errorBoundary.tsx diff --git a/src/extensionSlot.ts b/packages/repluggable/src/extensionSlot.ts similarity index 100% rename from src/extensionSlot.ts rename to packages/repluggable/src/extensionSlot.ts diff --git a/src/hot.ts b/packages/repluggable/src/hot.ts similarity index 100% rename from src/hot.ts rename to packages/repluggable/src/hot.ts diff --git a/src/index.ts b/packages/repluggable/src/index.ts similarity index 100% rename from src/index.ts rename to packages/repluggable/src/index.ts diff --git a/src/installedShellsState.ts b/packages/repluggable/src/installedShellsState.ts similarity index 100% rename from src/installedShellsState.ts rename to packages/repluggable/src/installedShellsState.ts diff --git a/src/interceptAnyObject.ts b/packages/repluggable/src/interceptAnyObject.ts similarity index 100% rename from src/interceptAnyObject.ts rename to packages/repluggable/src/interceptAnyObject.ts diff --git a/src/interceptEntryPoints.ts b/packages/repluggable/src/interceptEntryPoints.ts similarity index 100% rename from src/interceptEntryPoints.ts rename to packages/repluggable/src/interceptEntryPoints.ts diff --git a/src/invokeSlotCallbacks.ts b/packages/repluggable/src/invokeSlotCallbacks.ts similarity index 100% rename from src/invokeSlotCallbacks.ts rename to packages/repluggable/src/invokeSlotCallbacks.ts diff --git a/src/loggers.ts b/packages/repluggable/src/loggers.ts similarity index 100% rename from src/loggers.ts rename to packages/repluggable/src/loggers.ts diff --git a/src/monitorAPI.ts b/packages/repluggable/src/monitorAPI.ts similarity index 100% rename from src/monitorAPI.ts rename to packages/repluggable/src/monitorAPI.ts diff --git a/src/propsDeepEqual.tsx b/packages/repluggable/src/propsDeepEqual.tsx similarity index 100% rename from src/propsDeepEqual.tsx rename to packages/repluggable/src/propsDeepEqual.tsx diff --git a/src/renderSlotComponents.tsx b/packages/repluggable/src/renderSlotComponents.tsx similarity index 100% rename from src/renderSlotComponents.tsx rename to packages/repluggable/src/renderSlotComponents.tsx diff --git a/src/repluggableAppDebug/debug.d.ts b/packages/repluggable/src/repluggableAppDebug/debug.d.ts similarity index 100% rename from src/repluggableAppDebug/debug.d.ts rename to packages/repluggable/src/repluggableAppDebug/debug.d.ts diff --git a/src/repluggableAppDebug/index.ts b/packages/repluggable/src/repluggableAppDebug/index.ts similarity index 100% rename from src/repluggableAppDebug/index.ts rename to packages/repluggable/src/repluggableAppDebug/index.ts diff --git a/src/repluggableAppDebug/performanceDebugInfo.ts b/packages/repluggable/src/repluggableAppDebug/performanceDebugInfo.ts similarity index 100% rename from src/repluggableAppDebug/performanceDebugInfo.ts rename to packages/repluggable/src/repluggableAppDebug/performanceDebugInfo.ts diff --git a/src/repluggableAppDebug/repluggableAppDebug.ts b/packages/repluggable/src/repluggableAppDebug/repluggableAppDebug.ts similarity index 100% rename from src/repluggableAppDebug/repluggableAppDebug.ts rename to packages/repluggable/src/repluggableAppDebug/repluggableAppDebug.ts diff --git a/src/shellContext.ts b/packages/repluggable/src/shellContext.ts similarity index 100% rename from src/shellContext.ts rename to packages/repluggable/src/shellContext.ts diff --git a/src/storeContext.ts b/packages/repluggable/src/storeContext.ts similarity index 100% rename from src/storeContext.ts rename to packages/repluggable/src/storeContext.ts diff --git a/src/tarjanGraph.ts b/packages/repluggable/src/tarjanGraph.ts similarity index 100% rename from src/tarjanGraph.ts rename to packages/repluggable/src/tarjanGraph.ts diff --git a/src/throttledStore.tsx b/packages/repluggable/src/throttledStore.tsx similarity index 100% rename from src/throttledStore.tsx rename to packages/repluggable/src/throttledStore.tsx diff --git a/test/IterableWeakMap.spec.ts b/packages/repluggable/test/IterableWeakMap.spec.ts similarity index 100% rename from test/IterableWeakMap.spec.ts rename to packages/repluggable/test/IterableWeakMap.spec.ts diff --git a/test/appHost.mock.ts b/packages/repluggable/test/appHost.mock.ts similarity index 100% rename from test/appHost.mock.ts rename to packages/repluggable/test/appHost.mock.ts diff --git a/test/appHost.spec.ts b/packages/repluggable/test/appHost.spec.ts similarity index 100% rename from test/appHost.spec.ts rename to packages/repluggable/test/appHost.spec.ts diff --git a/test/connectWithShell.spec.tsx b/packages/repluggable/test/connectWithShell.spec.tsx similarity index 100% rename from test/connectWithShell.spec.tsx rename to packages/repluggable/test/connectWithShell.spec.tsx diff --git a/test/customExtensionSlot.spec.ts b/packages/repluggable/test/customExtensionSlot.spec.ts similarity index 100% rename from test/customExtensionSlot.spec.ts rename to packages/repluggable/test/customExtensionSlot.spec.ts diff --git a/test/errorBoundary.spec.tsx b/packages/repluggable/test/errorBoundary.spec.tsx similarity index 100% rename from test/errorBoundary.spec.tsx rename to packages/repluggable/test/errorBoundary.spec.tsx diff --git a/test/extensionSlot.spec.ts b/packages/repluggable/test/extensionSlot.spec.ts similarity index 100% rename from test/extensionSlot.spec.ts rename to packages/repluggable/test/extensionSlot.spec.ts diff --git a/test/installedShellsState.spec.ts b/packages/repluggable/test/installedShellsState.spec.ts similarity index 100% rename from test/installedShellsState.spec.ts rename to packages/repluggable/test/installedShellsState.spec.ts diff --git a/test/interceptAnyObject.spec.ts b/packages/repluggable/test/interceptAnyObject.spec.ts similarity index 100% rename from test/interceptAnyObject.spec.ts rename to packages/repluggable/test/interceptAnyObject.spec.ts diff --git a/test/interceptEntryPoints.spec.ts b/packages/repluggable/test/interceptEntryPoints.spec.ts similarity index 100% rename from test/interceptEntryPoints.spec.ts rename to packages/repluggable/test/interceptEntryPoints.spec.ts diff --git a/test/loggers.spec.ts b/packages/repluggable/test/loggers.spec.ts similarity index 100% rename from test/loggers.spec.ts rename to packages/repluggable/test/loggers.spec.ts diff --git a/test/propsDeepEqual.spec.tsx b/packages/repluggable/test/propsDeepEqual.spec.tsx similarity index 100% rename from test/propsDeepEqual.spec.tsx rename to packages/repluggable/test/propsDeepEqual.spec.tsx diff --git a/test/renderSlotComponents.spec.tsx b/packages/repluggable/test/renderSlotComponents.spec.tsx similarity index 100% rename from test/renderSlotComponents.spec.tsx rename to packages/repluggable/test/renderSlotComponents.spec.tsx diff --git a/test/repluggableAppDebug.spec.ts b/packages/repluggable/test/repluggableAppDebug.spec.ts similarity index 100% rename from test/repluggableAppDebug.spec.ts rename to packages/repluggable/test/repluggableAppDebug.spec.ts diff --git a/test/testKit.spec.tsx b/packages/repluggable/test/testKit.spec.tsx similarity index 100% rename from test/testKit.spec.tsx rename to packages/repluggable/test/testKit.spec.tsx diff --git a/test/tryTypings.ts b/packages/repluggable/test/tryTypings.ts similarity index 100% rename from test/tryTypings.ts rename to packages/repluggable/test/tryTypings.ts diff --git a/testKit/emptyLoggerOptions.ts b/packages/repluggable/testKit/emptyLoggerOptions.ts similarity index 100% rename from testKit/emptyLoggerOptions.ts rename to packages/repluggable/testKit/emptyLoggerOptions.ts diff --git a/testKit/index.tsx b/packages/repluggable/testKit/index.tsx similarity index 100% rename from testKit/index.tsx rename to packages/repluggable/testKit/index.tsx diff --git a/testKit/mockPackage.ts b/packages/repluggable/testKit/mockPackage.ts similarity index 100% rename from testKit/mockPackage.ts rename to packages/repluggable/testKit/mockPackage.ts diff --git a/testKit/package.json b/packages/repluggable/testKit/package.json similarity index 100% rename from testKit/package.json rename to packages/repluggable/testKit/package.json diff --git a/testKit/withConsoleErrors.ts b/packages/repluggable/testKit/withConsoleErrors.ts similarity index 100% rename from testKit/withConsoleErrors.ts rename to packages/repluggable/testKit/withConsoleErrors.ts diff --git a/testKit/withThrowOnError.ts b/packages/repluggable/testKit/withThrowOnError.ts similarity index 100% rename from testKit/withThrowOnError.ts rename to packages/repluggable/testKit/withThrowOnError.ts diff --git a/packages/repluggable/tsconfig.json b/packages/repluggable/tsconfig.json new file mode 100644 index 00000000..6acbaa92 --- /dev/null +++ b/packages/repluggable/tsconfig.json @@ -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" + ] +} diff --git a/webpack.base.config.js b/packages/repluggable/webpack.base.config.js similarity index 100% rename from webpack.base.config.js rename to packages/repluggable/webpack.base.config.js diff --git a/webpack.dev.config.js b/packages/repluggable/webpack.dev.config.js similarity index 100% rename from webpack.dev.config.js rename to packages/repluggable/webpack.dev.config.js diff --git a/webpack.local.config.js b/packages/repluggable/webpack.local.config.js similarity index 100% rename from webpack.local.config.js rename to packages/repluggable/webpack.local.config.js diff --git a/webpack.prod.config.js b/packages/repluggable/webpack.prod.config.js similarity index 100% rename from webpack.prod.config.js rename to packages/repluggable/webpack.prod.config.js diff --git a/yarn.lock b/yarn.lock index 32bbfd97..94abe746 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" From 1b1b697ebbf3f081b77cfa67a6b063a0967cf056 Mon Sep 17 00:00:00 2001 From: Daniel Kagan Date: Thu, 30 Jan 2025 12:36:10 +0200 Subject: [PATCH 2/3] Update release action --- .github/workflows/master.yml | 27 ++++++++++++++------------- .github/workflows/release.yml | 5 +++-- packages/repluggable/package.json | 2 +- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 383a699e..9c3bab37 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -1,7 +1,7 @@ name: Master Build on: push: - branches: [ master ] + branches: [master] jobs: build: @@ -10,15 +10,16 @@ jobs: matrix: os: [ubuntu-latest] steps: - - uses: actions/checkout@v1 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 20 - - name: install, build, and test - run: | - yarn - yarn build - yarn test - env: - CI: true + - uses: actions/checkout@v1 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: 20 + - name: install, build, and test + run: | + yarn + cd packages/repluggable + yarn build + yarn test + env: + CI: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd390e5c..1ec9fa9b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: yarnVersionArgs: description: 'Arguments for "yarn version"' required: true - default: 'patch' + default: "patch" jobs: publish: @@ -33,6 +33,7 @@ jobs: - name: Bump version run: | git reset --hard + cd packages/repluggable 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] @@ -48,7 +49,7 @@ jobs: - name: npm publish run: | - npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN + cd packages/repluggable npm publish env: NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} diff --git a/packages/repluggable/package.json b/packages/repluggable/package.json index c4772aba..bd00e77f 100644 --- a/packages/repluggable/package.json +++ b/packages/repluggable/package.json @@ -1,6 +1,6 @@ { "name": "repluggable", - "version": "1.302.60", + "version": "1.302.61", "license": "MIT", "description": "Allows composition of a React-with-Redux application entirely from a list of pluggable packages", "main": "dist/src/index.js", From 08c6fdb394af6802f8e6489c29a1142913d67dd5 Mon Sep 17 00:00:00 2001 From: Daniel Kagan Date: Thu, 30 Jan 2025 12:46:51 +0200 Subject: [PATCH 3/3] Small fixes --- .github/workflows/pr.yml | 2 +- package.json | 5 ++++- packages/repluggable/package.json | 18 +----------------- yarn.lock | 5 +++-- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e9af4e8e..c4f96937 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -25,8 +25,8 @@ jobs: - name: Bump version run: | - cd packages/repluggable git reset --hard + cd packages/repluggable echo yarn version "0.0.0-pr$PR_ID.$BUILD_NUMBER" yarn version "0.0.0-pr$PR_ID.$BUILD_NUMBER" git status -vv diff --git a/package.json b/package.json index 348045ff..6329e998 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,10 @@ "posttest": "yarn workspace repluggable posttest", "lintfix": "yarn workspace repluggable lintfix" }, + "devDependencies": { + "husky": "^4.3.0", + "lint-staged": "^10.4.2" + }, "resolutions": { "node-forge": "^1.0.0" }, @@ -40,4 +44,3 @@ }, "packageManager": "yarn@4.6.0" } - diff --git a/packages/repluggable/package.json b/packages/repluggable/package.json index bd00e77f..35a3d5c5 100644 --- a/packages/repluggable/package.json +++ b/packages/repluggable/package.json @@ -46,10 +46,8 @@ "@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", @@ -71,19 +69,5 @@ "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": "yarn@4.6.0" + } } diff --git a/yarn.lock b/yarn.lock index 94abe746..8bdd4c89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7566,6 +7566,9 @@ __metadata: "repluggable-monorepo@workspace:.": version: 0.0.0-use.local resolution: "repluggable-monorepo@workspace:." + dependencies: + husky: "npm:^4.3.0" + lint-staged: "npm:^10.4.2" languageName: unknown linkType: soft @@ -7580,10 +7583,8 @@ __metadata: "@types/react-test-renderer": "npm:^18.0.0" "@types/webpack-env": "npm:^1.15.3" case-sensitive-paths-webpack-plugin: "npm:^2.3.0" - husky: "npm:^4.3.0" jest: "npm:^26.6.0" jest-teamcity-reporter: "npm:^0.9.0" - lint-staged: "npm:^10.4.2" lodash: "npm:^4.17.20" prettier: "npm:^2.1.2" react: "npm:^18.0.0"