forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfluidBuild.config.cjs
154 lines (147 loc) · 4.59 KB
/
fluidBuild.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
// For "typetests:gen", it is only needed to be done before the tsc command
// that will build the generated files. Most of the time it is "build:test"
// but sometimes it is "tsc". Just include in all of them.
const tscDependsOn = ["^tsc", "build:genver", "typetests:gen"];
/**
* The settings in this file configure the Fluid build tools, such as fluid-build and flub. Some settings apply to the
* whole repo, while others apply only to the client release group.
*/
module.exports = {
tasks: {
"full": {
dependsOn: ["build", "webpack"],
script: false,
},
"build": {
dependsOn: ["compile", "lint", "build:docs"],
script: false,
},
"compile": {
dependsOn: ["commonjs", "build:esnext", "build:copy", "build:test"],
script: false,
},
"commonjs": {
dependsOn: ["tsc", "build:test"],
script: false,
},
"lint": {
dependsOn: ["prettier", "eslint", "good-fences"],
script: false,
},
"build:copy": [],
"build:genver": [],
"typetests:gen": ["^tsc", "build:genver"], // we may reexport type from dependent packages, needs to build them first.
"tsc": tscDependsOn,
"build:esnext": tscDependsOn,
"build:test": [...tscDependsOn, "tsc"],
"build:docs": [...tscDependsOn, "tsc"],
"eslint": [...tscDependsOn, "commonjs"],
"good-fences": [],
"prettier": [],
"webpack": ["^build:esnext"],
"clean": [],
},
// This defines the layout of the repo for fluid-build. It applies to the whole repo.
repoPackages: {
// Release groups
"client": {
directory: "",
ignoredDirs: [],
defaultInterdependencyRange: "workspace:~",
},
"build-tools": {
directory: "build-tools",
defaultInterdependencyRange: "workspace:*",
},
"server": "server/routerlicious",
"gitrest": "server/gitrest",
"historian": "server/historian",
// Independent packages
"build": "common/build",
"common-def": "common/lib/common-definitions",
"common-utils": "common/lib/common-utils",
"protocol-def": "common/lib/protocol-definitions",
// Tools
"tools": [
"tools/api-markdown-documenter",
"tools/benchmark",
"tools/getkeys",
"tools/test-tools",
"server/tinylicious",
],
// Services
"services": {
directory: "server",
ignoredDirs: ["routerlicious", "tinylicious", "gitrest", "historian"],
},
},
// `flub check policy` config. It applies to the whole repo.
policy: {
exclusions: [
"build-tools/packages/build-tools/src/test/data/",
"docs/layouts/",
"docs/themes/thxvscode/assets/",
"docs/themes/thxvscode/layouts/",
"docs/themes/thxvscode/static/assets/",
"docs/tutorials/.*\\.tsx?",
"azure/packages/azure-local-service/src/index.ts",
"experimental/PropertyDDS/packages/property-query/test/get_config.js",
"experimental/PropertyDDS/services/property-query-service/test/get_config.js",
"server/gitrest/package.json",
"server/historian/package.json",
"tools/markdown-magic/test",
"tools/telemetry-generator/package-lock.json", // Workaround to allow version 2 while we move it to pnpm
],
dependencies: {
// Packages require tilde dependencies
requireTilde: [
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser",
"eslint-config-prettier",
"eslint-plugin-eslint-comments",
"eslint-plugin-import",
"eslint-plugin-unicorn",
"eslint-plugin-unused-imports",
"eslint",
"prettier",
"typescript",
"webpack-dev-server",
],
},
// These packages are independently versioned and released, but we use pnpm workspaces in single packages to work
// around nested pnpm workspace behavior. These packages are not checked for the preinstall script that standard
// pnpm workspaces should have.
pnpmSinglePackageWorkspace: [
"@fluid-tools/api-markdown-documenter",
"@fluid-tools/benchmark",
"@fluid-tools/markdown-magic",
"@fluid-tools/telemetry-generator",
"@fluidframework/build-common",
"@fluidframework/common-definitions",
"@fluidframework/common-utils",
"@fluidframework/eslint-config-fluid",
"@fluidframework/protocol-definitions",
"@fluidframework/test-tools",
"fluidframework-docs",
"tinylicious",
],
fluidBuildTasks: {
tsc: {
ignoreTasks: ["tsc:watch"],
ignoreDevDependencies: ["@fluid-tools/webpack-fluid-loader"],
},
},
},
// This defines the branch release types for type tests. It applies only to the client release group. Settings for
// other release groups is in their root fluid-build config.
branchReleaseTypes: {
"main": "minor",
"lts": "minor",
"release/**": "patch",
"next": "major",
},
};