Skip to content

Commit ffd8c55

Browse files
authored
Replacing Lerna with pnpm on LTS (#25537)
This PR replaces lerna for client packages in the LTS branch with pnpm, and merges azure into the 'client' package group The build tools version used by LTS isn't compatible with pnpm's workspace:~ dependency protocol, so we had to use a version of build-tools from main which does support that protocol. That introduced a few ancilliary changes we had to make: 1 - build-tools from main requires node>=20. As a result we've updated LTS to use node 20.15.1 (the min required version on main) 2 - Updating to node 20.15.1 required us to update our eslint dependency to a version compatible with node 20 2a - Updating eslint also introduced a number of linter changes to various code files 3 - the latest version of build-tools from main had similar but different type test generation code - we had to update the typeValidation JSON in various package.jsons, and the build-tools generated type tests are generated with slightly different names + paths 4 - we disabled the layer-checking policy check on LTS (per offline discussion, we decided it was unlikely there would be major dependency changes to LTS in the future, and so it would be a lot of work for little payoff to enable layer-checking using the latest build-tools version on LTS) 5 - Since main considers azure packages to be part of the client workgroup, we've added azure packages to this change and made them use pnpm 5a - This also lets us remove the build-azure pipeline, since azure gets included with the client packages build 6 - Several pipelines were updated to use pnpm, install pnpm dependencies, and use flub to publish packages. Where possible, the implementations have been pulled directly from main 7 - build-tools sources (and associated pipeline to build build-tools) have been removed. We're now using build-tools from main, which means this code is no longer needed to be built or maintained (NB: the server/ code which uses old build-tools is planned to be removed in a subsequent PR) Workarounds needed: 1) api-extractor dependencies are using ~7.22.2 instead of ^7.22.2 now. This was to work around an issue with api-extractor, where ^ dependencies used an inconsistent version of the typescript compiler that caused build failures (and the command line switch to point api-extractor to the right compiler to use did not work) 2) eslint configurations have been set to use 0.28.2000. This resulted in a downgraded eslint config for some projects. This was done because of the migration to node 20 - eslint config 0.28.2000's dependencies were compatible with node 20, but 2.0.0 included extra dependencies which were incompatible with node 20 3) @types/node set to 14.18.0 everywhere - trying to use a different types/node version caused typescript compilation failures when processing d.ts files of those libraries, and options like skipLibCheck etc did not fix it. Setting all projects to @types/node 14.18.0 resolved the issue (NB: main has a similar workaround of using node types v 18 due to compilation issues, despite it using node 20+)
1 parent ea55911 commit ffd8c55

File tree

587 files changed

+61279
-71272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

587 files changed

+61279
-71272
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
/packages/utils/telemetry-utils/ @microsoft/fluid-cr-telemetry
3737
/server/ @microsoft/fluid-cr-server
3838
/tools/ @microsoft/fluid-cr-infra
39-
/tools/pipelines/build-azure.yml @microsoft/fluid-cr-framework
4039

4140
# PUBLIC API REPORTS
4241
# All packages are assumed to have public APIs unless defined otherwise in the sections below.

.github/actions-labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
- BREAKING.md
6868

6969
dependencies:
70-
- lerna-package-lock.json
70+
- pnpm-lock.yaml
7171
- package-lock.json
7272

7373
documentation:

.npmrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
engine-strict=true
2+
3+
# Temporary, because otherwise pnpm fails due to peer dependencies not being satisfied
4+
# with our current dependency graph. (copied from main repo, PR 13554)
5+
strict-peer-dependencies=false
6+
7+
# Disable pnpm update notifications since we use corepack to install package managers
8+
update-notifier=false
9+
10+
link-workspace-packages=true

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20

.releaseGroup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The presence of this file in a directory indicates it is the root of a release group.

api-report/merge-tree.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export class Client {
219219
// (undocumented)
220220
walkSegments<TClientData>(handler: ISegmentAction<TClientData>, start: number | undefined, end: number | undefined, accum: TClientData, splitRange?: boolean): void;
221221
// (undocumented)
222-
walkSegments<undefined>(handler: ISegmentAction<undefined>, start?: number, end?: number, accum?: undefined, splitRange?: boolean): void;
222+
walkSegments(handler: ISegmentAction<undefined>, start?: number, end?: number, accum?: undefined, splitRange?: boolean): void;
223223
}
224224

225225
// @public (undocumented)

azure/package.json

Lines changed: 0 additions & 116 deletions
This file was deleted.

azure/packages/azure-client/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
module.exports = {
7-
extends: [require.resolve("@fluidframework/eslint-config-fluid/strict"), "prettier"],
7+
extends: [require.resolve("@fluidframework/eslint-config-fluid"), "prettier"],
88
plugins: ["eslint-plugin-jsdoc"],
99
parserOptions: {
1010
project: ["./tsconfig.json", "./src/test/tsconfig.json"],

azure/packages/azure-client/package.json

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,56 +39,57 @@
3939
"test:realsvc:local:run": "mocha --unhandled-rejections=strict --recursive dist/test/**/*.spec.js --exit --timeout 10000",
4040
"test:realsvc:tinylicious": "start-server-and-test start:tinylicious:test 7070 test:realsvc:local:run",
4141
"tsc": "tsc",
42-
"typetests:gen": "flub generate typetests --generate --dir .",
42+
"typetests:gen": "flub generate typetests --dir . -v",
4343
"typetests:prepare": "flub generate typetests --prepare --dir . --pin"
4444
},
4545
"dependencies": {
4646
"@fluidframework/common-definitions": "^0.20.1",
4747
"@fluidframework/common-utils": "^1.1.1",
48-
"@fluidframework/container-definitions": "^1.4.0",
49-
"@fluidframework/container-loader": "^1.4.0",
50-
"@fluidframework/core-interfaces": "^1.4.0",
51-
"@fluidframework/driver-definitions": "^1.4.0",
52-
"@fluidframework/driver-utils": "^1.4.0",
53-
"@fluidframework/fluid-static": "^1.4.0",
54-
"@fluidframework/map": "^1.4.0",
48+
"@fluidframework/container-definitions": "workspace:~",
49+
"@fluidframework/container-loader": "workspace:~",
50+
"@fluidframework/core-interfaces": "workspace:~",
51+
"@fluidframework/driver-definitions": "workspace:~",
52+
"@fluidframework/driver-utils": "workspace:~",
53+
"@fluidframework/fluid-static": "workspace:~",
54+
"@fluidframework/map": "workspace:~",
5555
"@fluidframework/protocol-definitions": "^1.0.0",
56-
"@fluidframework/routerlicious-driver": "^1.4.0",
57-
"@fluidframework/runtime-utils": "^1.4.0",
56+
"@fluidframework/routerlicious-driver": "workspace:~",
57+
"@fluidframework/runtime-utils": "workspace:~",
5858
"@fluidframework/server-services-client": "^0.1036.5002",
5959
"axios": "^0.28.0",
6060
"uuid": "^8.3.1"
6161
},
6262
"devDependencies": {
63-
"@fluid-tools/build-cli": "^0.10.0",
64-
"@fluidframework/aqueduct": "^1.4.0",
63+
"@fluid-tools/build-cli": "^0.55.0",
64+
"@fluidframework/aqueduct": "workspace:~",
6565
"@fluidframework/azure-client-previous": "npm:@fluidframework/[email protected]",
66-
"@fluidframework/azure-local-service": "^1.2.0",
66+
"@fluidframework/azure-local-service": "workspace:~",
6767
"@fluidframework/build-common": "^1.2.0",
68-
"@fluidframework/build-tools": "^0.10.0",
69-
"@fluidframework/counter": "^1.4.0",
70-
"@fluidframework/eslint-config-fluid": "^2.0.0",
71-
"@fluidframework/test-client-utils": "1.4.0",
72-
"@fluidframework/test-utils": "^1.4.0",
73-
"@microsoft/api-extractor": "^7.34.4",
68+
"@fluidframework/build-tools": "^0.55.0",
69+
"@fluidframework/counter": "workspace:~",
70+
"@fluidframework/eslint-config-fluid": "^0.28.2000",
71+
"@fluidframework/test-client-utils": "workspace:~",
72+
"@fluidframework/test-utils": "workspace:~",
73+
"@microsoft/api-extractor": "~7.34.4",
7474
"@types/mocha": "^9.1.1",
75-
"@types/node": "^18.15.3",
75+
"@types/node": "^14.18.0",
7676
"concurrently": "^7.6.0",
7777
"copyfiles": "^2.4.1",
7878
"cross-env": "^7.0.3",
79-
"eslint": "~8.6.0",
79+
"eslint": "~8.55.0",
8080
"eslint-config-prettier": "~8.5.0",
81-
"eslint-plugin-jsdoc": "~39.3.0",
81+
"eslint-plugin-jsdoc": "~46.8.2",
8282
"mocha": "^10.2.0",
8383
"prettier": "~2.6.2",
8484
"rimraf": "^2.6.2",
8585
"start-server-and-test": "^1.11.7",
8686
"typescript": "~4.5.5"
8787
},
8888
"peerDependencies": {
89-
"fluid-framework": "^1.4.0"
89+
"fluid-framework": "workspace:~"
9090
},
9191
"typeValidation": {
92-
"broken": {}
92+
"broken": {},
93+
"entrypoint": "public"
9394
}
9495
}

0 commit comments

Comments
 (0)