@proteinjs/build 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +20 -0
- package/.prettierignore +4 -0
- package/.prettierrc +8 -0
- package/CHANGELOG.md +30 -178
- package/dist/src/Github.d.ts.map +1 -1
- package/dist/src/Github.js +8 -4
- package/dist/src/Github.js.map +1 -1
- package/dist/src/bin/runBuildWorkspace.js.map +1 -1
- package/dist/src/bin/runCleanWorkspace.js.map +1 -1
- package/dist/src/bin/runLintWorkspace.d.ts +3 -0
- package/dist/src/bin/runLintWorkspace.d.ts.map +1 -0
- package/dist/src/bin/runLintWorkspace.js +6 -0
- package/dist/src/bin/runLintWorkspace.js.map +1 -0
- package/dist/src/bin/runSymlinkWorkspace.js.map +1 -1
- package/dist/src/bin/runTestWorkspace.js.map +1 -1
- package/dist/src/bin/runVersionWorkspace.js.map +1 -1
- package/dist/src/bin/runWatchWorkspace.js.map +1 -1
- package/dist/src/bin/runWorkspaceCommand.js.map +1 -1
- package/dist/src/bin/runWorkspacePackageCommand.js.map +1 -1
- package/dist/src/buildWorkspace.d.ts +1 -0
- package/dist/src/buildWorkspace.d.ts.map +1 -1
- package/dist/src/buildWorkspace.js +26 -9
- package/dist/src/buildWorkspace.js.map +1 -1
- package/dist/src/cleanWorkspace.d.ts.map +1 -1
- package/dist/src/cleanWorkspace.js.map +1 -1
- package/dist/src/lintWorkspace.d.ts +9 -0
- package/dist/src/lintWorkspace.d.ts.map +1 -0
- package/dist/src/lintWorkspace.js +134 -0
- package/dist/src/lintWorkspace.js.map +1 -0
- package/dist/src/symlinkWorkspace.d.ts.map +1 -1
- package/dist/src/symlinkWorkspace.js +2 -1
- package/dist/src/symlinkWorkspace.js.map +1 -1
- package/dist/src/testWorkspace.d.ts.map +1 -1
- package/dist/src/testWorkspace.js +2 -1
- package/dist/src/testWorkspace.js.map +1 -1
- package/dist/src/versionWorkspace.d.ts.map +1 -1
- package/dist/src/versionWorkspace.js +99 -59
- package/dist/src/versionWorkspace.js.map +1 -1
- package/dist/src/watchWorkspace.d.ts.map +1 -1
- package/dist/src/watchWorkspace.js +15 -8
- package/dist/src/watchWorkspace.js.map +1 -1
- package/dist/src/workspaceCommand.d.ts.map +1 -1
- package/dist/src/workspaceCommand.js +4 -3
- package/dist/src/workspaceCommand.js.map +1 -1
- package/dist/src/workspacePackageCommand.d.ts.map +1 -1
- package/dist/src/workspacePackageCommand.js +2 -1
- package/dist/src/workspacePackageCommand.js.map +1 -1
- package/jest.config.js +8 -17
- package/package.json +9 -3
- package/src/Github.ts +30 -27
- package/src/bin/runBuildWorkspace.ts +2 -2
- package/src/bin/runCleanWorkspace.ts +2 -2
- package/src/bin/runLintWorkspace.ts +5 -0
- package/src/bin/runSymlinkWorkspace.ts +2 -2
- package/src/bin/runTestWorkspace.ts +2 -2
- package/src/bin/runVersionWorkspace.ts +2 -2
- package/src/bin/runWatchWorkspace.ts +2 -2
- package/src/bin/runWorkspaceCommand.ts +2 -2
- package/src/bin/runWorkspacePackageCommand.ts +2 -2
- package/src/buildWorkspace.ts +37 -21
- package/src/cleanWorkspace.ts +17 -9
- package/src/lintWorkspace.ts +62 -0
- package/src/logColors.ts +1 -1
- package/src/symlinkWorkspace.ts +23 -16
- package/src/testWorkspace.ts +19 -10
- package/src/versionWorkspace.ts +183 -79
- package/src/watchWorkspace.ts +41 -24
- package/src/workspaceCommand.ts +26 -20
- package/src/workspacePackageCommand.ts +16 -11
- package/tsconfig.json +18 -22
- package/webpack.config.js +12 -12
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'prettier'],
|
|
3
|
+
parser: '@typescript-eslint/parser',
|
|
4
|
+
plugins: ['@typescript-eslint', 'prettier'],
|
|
5
|
+
root: true,
|
|
6
|
+
ignorePatterns: ['**/dist/*', '**/node_modules/*', 'build-workspace.js'],
|
|
7
|
+
|
|
8
|
+
rules: {
|
|
9
|
+
'prettier/prettier': ['warn'],
|
|
10
|
+
curly: ['warn'],
|
|
11
|
+
'eol-last': ['warn', 'always'],
|
|
12
|
+
'keyword-spacing': ['warn', { before: true }],
|
|
13
|
+
'no-undef': 'off',
|
|
14
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
15
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
16
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
17
|
+
'@typescript-eslint/prefer-as-const': 'off',
|
|
18
|
+
'@typescript-eslint/ban-types': 'off',
|
|
19
|
+
},
|
|
20
|
+
};
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -3,357 +3,209 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [1.
|
|
6
|
+
# [1.4.0](https://github.com/proteinjs/build/compare/@proteinjs/build@1.3.1...@proteinjs/build@1.4.0) (2024-05-10)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Features
|
|
10
10
|
|
|
11
|
-
*
|
|
12
|
-
|
|
11
|
+
* add linting ([024b766](https://github.com/proteinjs/build/commit/024b76630f29da57fab0bb806a0de13017b1b3bb))
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
## [1.2.2](https://github.com/proteinjs/build/compare/@proteinjs/build@1.2.1...@proteinjs/build@1.2.2) (2024-05-02)
|
|
18
16
|
|
|
17
|
+
## [1.3.1](https://github.com/proteinjs/build/compare/@proteinjs/build@1.3.0...@proteinjs/build@1.3.1) (2024-05-07)
|
|
19
18
|
|
|
20
19
|
### Bug Fixes
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
- `versionWorkspace` should correctly check if workspace version is fixed, and update the version in lerna.json as well when the version changes ([4a1f5ae](https://github.com/proteinjs/build/commit/4a1f5ae49d1f70893276104dca3b796f6c8ea775))
|
|
25
22
|
|
|
23
|
+
# [1.3.0](https://github.com/proteinjs/build/compare/@proteinjs/build@1.2.2...@proteinjs/build@1.3.0) (2024-05-03)
|
|
26
24
|
|
|
25
|
+
### Features
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
- added `symlinkWorkspace` to symlink all local dependencies of all packages in the workspace ([da81067](https://github.com/proteinjs/build/commit/da810678641dee1360f1fb8d6dbed4f1e07d4ad0))
|
|
29
28
|
|
|
29
|
+
## [1.2.2](https://github.com/proteinjs/build/compare/@proteinjs/build@1.2.1...@proteinjs/build@1.2.2) (2024-05-02)
|
|
30
30
|
|
|
31
31
|
### Bug Fixes
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
- `workspacePackageCommand` needs to re-build packageMap after executing npm command ([2e39aba](https://github.com/proteinjs/build/commit/2e39ababfc9bda9db73acbb76c7d7aeeadf796b0))
|
|
35
34
|
|
|
35
|
+
## [1.2.1](https://github.com/proteinjs/build/compare/@proteinjs/build@1.2.0...@proteinjs/build@1.2.1) (2024-05-01)
|
|
36
36
|
|
|
37
|
+
### Bug Fixes
|
|
37
38
|
|
|
39
|
+
- `versionWorkspace` no longer attempt to color package names in commit messages ([d57728d](https://github.com/proteinjs/build/commit/d57728d87dfca79bafe8ff8fb231930787fe4731))
|
|
38
40
|
|
|
39
41
|
# [1.2.0](https://github.com/proteinjs/build/compare/@proteinjs/build@1.1.5...@proteinjs/build@1.2.0) (2024-04-30)
|
|
40
42
|
|
|
41
|
-
|
|
42
43
|
### Features
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
- `versionWorkspace` now supports fixed-version, private (non-published) workspaces ([3c63d72](https://github.com/proteinjs/build/commit/3c63d72bcc5f57300cc6fc0c76e0f568d2421eb1))
|
|
49
46
|
|
|
50
47
|
## [1.1.5](https://github.com/proteinjs/build/compare/@proteinjs/build@1.1.4...@proteinjs/build@1.1.5) (2024-04-27)
|
|
51
48
|
|
|
52
|
-
|
|
53
49
|
### Bug Fixes
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
- `versionWorkspace` pull meta repo before pushing to it ([08e7aaa](https://github.com/proteinjs/build/commit/08e7aaa82694e7893561add2d148b81fcd3488f1))
|
|
60
52
|
|
|
61
53
|
## [1.1.3](https://github.com/proteinjs/build/compare/@proteinjs/build@1.1.2...@proteinjs/build@1.1.3) (2024-04-24)
|
|
62
54
|
|
|
63
|
-
|
|
64
55
|
### Bug Fixes
|
|
65
56
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
- `versionWorksace` should fail fast if npm token is not available ([a079c77](https://github.com/proteinjs/build/commit/a079c77aaabb154f7760f9a3e08de73f67fe4279))
|
|
71
58
|
|
|
72
59
|
## [1.1.2](https://github.com/proteinjs/build/compare/@proteinjs/build@1.1.1...@proteinjs/build@1.1.2) (2024-04-24)
|
|
73
60
|
|
|
74
|
-
|
|
75
61
|
### Bug Fixes
|
|
76
62
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
63
|
+
- `versionWorkspace` erronously pushing meta repo after pulling workspace. not sure how that got there ([1d7571e](https://github.com/proteinjs/build/commit/1d7571e39086bf8ae049cbd46257bf98169b07b5))
|
|
82
64
|
|
|
83
65
|
## [1.1.1](https://github.com/proteinjs/build/compare/@proteinjs/build@1.1.0...@proteinjs/build@1.1.1) (2024-04-24)
|
|
84
66
|
|
|
85
|
-
|
|
86
67
|
### Bug Fixes
|
|
87
68
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
69
|
+
- `versionWorkspace` should re-symlink workspace dependencies after publishing packages so the workspace continues to function if not in ci ([98a2c39](https://github.com/proteinjs/build/commit/98a2c39494e38c60b910ca18fb7b806733cad123))
|
|
93
70
|
|
|
94
71
|
# [1.1.0](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.29...@proteinjs/build@1.1.0) (2024-04-24)
|
|
95
72
|
|
|
96
|
-
|
|
97
73
|
### Features
|
|
98
74
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
75
|
+
- added `workspace-package` to run commands from the workspace root in specific package directories. If a npm command is run, it re-symlinks the package dependencies ([a4da175](https://github.com/proteinjs/build/commit/a4da17549759ca4fd332c611c0e85a6f6e138f6d))
|
|
104
76
|
|
|
105
77
|
## [1.0.29](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.28...@proteinjs/build@1.0.29) (2024-04-24)
|
|
106
78
|
|
|
107
|
-
|
|
108
79
|
### Bug Fixes
|
|
109
80
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
81
|
+
- `versionWorkspace` back to cleaning before installing; fixed the @proteinjs/reflection-build-test-b build process ([c159916](https://github.com/proteinjs/build/commit/c159916ca86a7b1fb5cc43334c7ad58497f19432))
|
|
115
82
|
|
|
116
83
|
## [1.0.28](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.27...@proteinjs/build@1.0.28) (2024-04-24)
|
|
117
84
|
|
|
118
|
-
|
|
119
85
|
### Bug Fixes
|
|
120
86
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
87
|
+
- `versionWorkspace` should push meta repos recursively, deep to shallow ([9e062a3](https://github.com/proteinjs/build/commit/9e062a3e8b98c46b08d816b93b588aff6cf7f59e))
|
|
126
88
|
|
|
127
89
|
## [1.0.27](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.26...@proteinjs/build@1.0.27) (2024-04-23)
|
|
128
90
|
|
|
129
|
-
|
|
130
91
|
### Bug Fixes
|
|
131
92
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
93
|
+
- `versionWorkspace` should still push new versions of private packages (just not publish) ([1f5bfba](https://github.com/proteinjs/build/commit/1f5bfba974be44f68e2d971a24aa72e1c6854326))
|
|
137
94
|
|
|
138
95
|
## [1.0.25](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.24...@proteinjs/build@1.0.25) (2024-04-22)
|
|
139
96
|
|
|
140
|
-
|
|
141
97
|
### Bug Fixes
|
|
142
98
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
99
|
+
- `versionWorkspace` needs to pull the whole workspace before fetching `WorkspaceMetadata`; else we'll potentially have out-of-date package version info ([025f4fc](https://github.com/proteinjs/build/commit/025f4fc9786bfd53f3bec98221e627c55e2c256a))
|
|
148
100
|
|
|
149
101
|
## [1.0.24](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.23...@proteinjs/build@1.0.24) (2024-04-22)
|
|
150
102
|
|
|
151
|
-
|
|
152
103
|
### Bug Fixes
|
|
153
104
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
105
|
+
- `versionWorkspace` shoud pull before attempting to version a package ([ba5b683](https://github.com/proteinjs/build/commit/ba5b68357f0f1fae3c4494d931505b4088ccc8e2))
|
|
159
106
|
|
|
160
107
|
## [1.0.23](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.22...@proteinjs/build@1.0.23) (2024-04-22)
|
|
161
108
|
|
|
162
|
-
|
|
163
109
|
### Bug Fixes
|
|
164
110
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
111
|
+
- `versionWorkspace` shouldn't clean before installing (that can mess with more complicated build processes like @proteinjs/reflection-build-test-b). instead, just delete the package-lock pre-install ([8ceb1cd](https://github.com/proteinjs/build/commit/8ceb1cd6387a2bb91bbb0a381a73be70ed8f931c))
|
|
170
112
|
|
|
171
113
|
## [1.0.22](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.21...@proteinjs/build@1.0.22) (2024-04-22)
|
|
172
114
|
|
|
173
|
-
|
|
174
115
|
### Bug Fixes
|
|
175
116
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
117
|
+
- `versionWorkspace` should not attempt to bump versions of local path dependencies (ie: file:../b) ([58405d8](https://github.com/proteinjs/build/commit/58405d8bb11e563a9da6c5b5b9bdbdf3dd886448))
|
|
181
118
|
|
|
182
119
|
## [1.0.21](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.20...@proteinjs/build@1.0.21) (2024-04-22)
|
|
183
120
|
|
|
184
|
-
|
|
185
121
|
### Bug Fixes
|
|
186
122
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
123
|
+
- `versionWorkspace` was failing to get dependency versions from dev dependencies ([eb477a0](https://github.com/proteinjs/build/commit/eb477a044e2314a0fe5db296274c4d7f68f9b735))
|
|
192
124
|
|
|
193
125
|
## [1.0.20](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.19...@proteinjs/build@1.0.20) (2024-04-22)
|
|
194
126
|
|
|
195
|
-
|
|
196
127
|
### Bug Fixes
|
|
197
128
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
129
|
+
- `versionWorkspace` writing of package.json still needs to be formatted ([d25b00d](https://github.com/proteinjs/build/commit/d25b00daf6ebd63a3b6d4064346bfd0ae16eeeb6))
|
|
203
130
|
|
|
204
131
|
## [1.0.19](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.18...@proteinjs/build@1.0.19) (2024-04-22)
|
|
205
132
|
|
|
206
|
-
|
|
207
133
|
### Bug Fixes
|
|
208
134
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
135
|
+
- `versionWorkspace` needs to serialize package.jsons before writing them ([d31840c](https://github.com/proteinjs/build/commit/d31840c18b374746a9e80cce1d1a0e69e80834af))
|
|
214
136
|
|
|
215
137
|
## [1.0.18](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.17...@proteinjs/build@1.0.18) (2024-04-22)
|
|
216
138
|
|
|
217
|
-
|
|
218
139
|
### Bug Fixes
|
|
219
140
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
141
|
+
- `versionWorkspace` should still version (but not publish) private packages. ie. if we don't bump @proteinjs/reflection-build-test-a's depenency on @proteinjs/reflection when reflection changes, the test package's build will break ([c5fc5e5](https://github.com/proteinjs/build/commit/c5fc5e50fde9f138d4044f6ef3437ee7095b2672))
|
|
225
142
|
|
|
226
143
|
## [1.0.17](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.16...@proteinjs/build@1.0.17) (2024-04-22)
|
|
227
144
|
|
|
228
145
|
**Note:** Version bump only for package @proteinjs/build
|
|
229
146
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
147
|
## [1.0.16](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.15...@proteinjs/build@1.0.16) (2024-04-19)
|
|
235
148
|
|
|
236
149
|
**Note:** Version bump only for package @proteinjs/build
|
|
237
150
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
151
|
## [1.0.15](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.14...@proteinjs/build@1.0.15) (2024-04-19)
|
|
243
152
|
|
|
244
|
-
|
|
245
153
|
### Bug Fixes
|
|
246
154
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
155
|
+
- flags now work in `buildWorkspace` and `workspaceCommand` ([82e998c](https://github.com/proteinjs/build/commit/82e998c1cac50e42be34893d20b99369eef52a39))
|
|
252
156
|
|
|
253
157
|
## [1.0.14](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.13...@proteinjs/build@1.0.14) (2024-04-18)
|
|
254
158
|
|
|
255
159
|
**Note:** Version bump only for package @proteinjs/build
|
|
256
160
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
161
|
## [1.0.13](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.12...@proteinjs/build@1.0.13) (2024-04-18)
|
|
262
162
|
|
|
263
163
|
**Note:** Version bump only for package @proteinjs/build
|
|
264
164
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
165
|
## [1.0.12](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.11...@proteinjs/build@1.0.12) (2024-04-18)
|
|
270
166
|
|
|
271
167
|
**Note:** Version bump only for package @proteinjs/build
|
|
272
168
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
169
|
## [1.0.11](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.10...@proteinjs/build@1.0.11) (2024-04-18)
|
|
278
170
|
|
|
279
171
|
**Note:** Version bump only for package @proteinjs/build
|
|
280
172
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
173
|
## [1.0.10](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.9...@proteinjs/build@1.0.10) (2024-04-17)
|
|
286
174
|
|
|
287
175
|
**Note:** Version bump only for package @proteinjs/build
|
|
288
176
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
177
|
## [1.0.9](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.8...@proteinjs/build@1.0.9) (2024-04-17)
|
|
294
178
|
|
|
295
179
|
**Note:** Version bump only for package @proteinjs/build
|
|
296
180
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
181
|
## [1.0.8](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.7...@proteinjs/build@1.0.8) (2024-04-17)
|
|
302
182
|
|
|
303
183
|
**Note:** Version bump only for package @proteinjs/build
|
|
304
184
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
185
|
## [1.0.7](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.6...@proteinjs/build@1.0.7) (2024-04-16)
|
|
310
186
|
|
|
311
187
|
**Note:** Version bump only for package @proteinjs/build
|
|
312
188
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
189
|
## [1.0.6](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.5...@proteinjs/build@1.0.6) (2024-04-16)
|
|
318
190
|
|
|
319
191
|
**Note:** Version bump only for package @proteinjs/build
|
|
320
192
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
193
|
## [1.0.5](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.4...@proteinjs/build@1.0.5) (2024-04-16)
|
|
326
194
|
|
|
327
195
|
**Note:** Version bump only for package @proteinjs/build
|
|
328
196
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
197
|
## [1.0.4](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.3...@proteinjs/build@1.0.4) (2024-04-16)
|
|
334
198
|
|
|
335
199
|
**Note:** Version bump only for package @proteinjs/build
|
|
336
200
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
201
|
## [1.0.3](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.2...@proteinjs/build@1.0.3) (2024-04-16)
|
|
342
202
|
|
|
343
203
|
**Note:** Version bump only for package @proteinjs/build
|
|
344
204
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
205
|
## [1.0.2](https://github.com/proteinjs/build/compare/@proteinjs/build@1.0.1...@proteinjs/build@1.0.2) (2024-04-16)
|
|
350
206
|
|
|
351
207
|
**Note:** Version bump only for package @proteinjs/build
|
|
352
208
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
209
|
## 1.0.1 (2024-04-16)
|
|
358
210
|
|
|
359
211
|
**Note:** Version bump only for package @proteinjs/build
|
package/dist/src/Github.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Github.d.ts","sourceRoot":"","sources":["../../src/Github.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"Github.d.ts","sourceRoot":"","sources":["../../src/Github.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAqC;IACnD,OAAO,CAAC,SAAS,CAAS;gBAEd,SAAS,CAAC,EAAE,MAAM;IAI9B,OAAO,CAAC,cAAc;IAQtB;;;;;;;;OAQG;IACG,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,SAAgB;YAsB9F,cAAc;CAoB7B"}
|
package/dist/src/Github.js
CHANGED
|
@@ -45,8 +45,9 @@ var Github = /** @class */ (function () {
|
|
|
45
45
|
this.authToken = authToken ? authToken : this.getGithubToken();
|
|
46
46
|
}
|
|
47
47
|
Github.prototype.getGithubToken = function () {
|
|
48
|
-
if (process.env.GITHUB_TOKEN)
|
|
48
|
+
if (process.env.GITHUB_TOKEN) {
|
|
49
49
|
return process.env.GITHUB_TOKEN;
|
|
50
|
+
}
|
|
50
51
|
throw new Error("GITHUB_TOKEN env variable not set");
|
|
51
52
|
};
|
|
52
53
|
/**
|
|
@@ -79,8 +80,9 @@ var Github = /** @class */ (function () {
|
|
|
79
80
|
}
|
|
80
81
|
throw new Error("Workflow run failed: ".concat(workflowName, ", for commit: ").concat(JSON.stringify(commit)));
|
|
81
82
|
}
|
|
82
|
-
if (Date.now() - startTime > timeout)
|
|
83
|
+
if (Date.now() - startTime > timeout) {
|
|
83
84
|
throw new Error("Timed out checking for workflow run: ".concat(workflowName, ", for commit: ").concat(JSON.stringify(commit)));
|
|
85
|
+
}
|
|
84
86
|
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 10000); })];
|
|
85
87
|
case 3:
|
|
86
88
|
_a.sent();
|
|
@@ -105,10 +107,12 @@ var Github = /** @class */ (function () {
|
|
|
105
107
|
case 1:
|
|
106
108
|
response = _a.sent();
|
|
107
109
|
workflowRuns = response.data.workflow_runs.filter(function (run) {
|
|
108
|
-
if (run.head_sha !== commit.sha)
|
|
110
|
+
if (run.head_sha !== commit.sha) {
|
|
109
111
|
return false;
|
|
110
|
-
|
|
112
|
+
}
|
|
113
|
+
if (workflowName && run.name !== workflowName) {
|
|
111
114
|
return false;
|
|
115
|
+
}
|
|
112
116
|
return true;
|
|
113
117
|
});
|
|
114
118
|
return [2 /*return*/, workflowRuns[0]];
|
package/dist/src/Github.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Github.js","sourceRoot":"","sources":["../../src/Github.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Github.js","sourceRoot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
{"version":3,"file":"runBuildWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runBuildWorkspace.ts"],"names":[],"mappings":";;;AAEA,oDAAmD;AAEnD,IAAA,+BAAc,GAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCleanWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runCleanWorkspace.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"runCleanWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runCleanWorkspace.ts"],"names":[],"mappings":";;;AAEA,oDAAmD;AAEnD,IAAA,+BAAc,GAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runLintWorkspace.d.ts","sourceRoot":"","sources":["../../../src/bin/runLintWorkspace.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runLintWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runLintWorkspace.ts"],"names":[],"mappings":";;;AAEA,kDAAiD;AAEjD,IAAA,6BAAa,GAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runSymlinkWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runSymlinkWorkspace.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"runSymlinkWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runSymlinkWorkspace.ts"],"names":[],"mappings":";;;AAEA,wDAAuD;AAEvD,IAAA,mCAAgB,GAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runTestWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runTestWorkspace.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"runTestWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runTestWorkspace.ts"],"names":[],"mappings":";;;AAEA,kDAAiD;AAEjD,IAAA,6BAAa,GAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runVersionWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runVersionWorkspace.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"runVersionWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runVersionWorkspace.ts"],"names":[],"mappings":";;;AAEA,wDAAuD;AAEvD,IAAA,mCAAgB,GAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runWatchWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runWatchWorkspace.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"runWatchWorkspace.js","sourceRoot":"","sources":["../../../src/bin/runWatchWorkspace.ts"],"names":[],"mappings":";;;AAEA,oDAAmD;AAEnD,IAAA,+BAAc,GAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runWorkspaceCommand.js","sourceRoot":"","sources":["../../../src/bin/runWorkspaceCommand.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"runWorkspaceCommand.js","sourceRoot":"","sources":["../../../src/bin/runWorkspaceCommand.ts"],"names":[],"mappings":";;;AAEA,wDAAuD;AAEvD,IAAA,mCAAgB,GAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runWorkspacePackageCommand.js","sourceRoot":"","sources":["../../../src/bin/runWorkspacePackageCommand.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"runWorkspacePackageCommand.js","sourceRoot":"","sources":["../../../src/bin/runWorkspacePackageCommand.ts"],"names":[],"mappings":";;;AAEA,sEAAqE;AAErE,IAAA,iDAAuB,GAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildWorkspace.d.ts","sourceRoot":"","sources":["../../src/buildWorkspace.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"buildWorkspace.d.ts","sourceRoot":"","sources":["../../src/buildWorkspace.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,wBAAsB,cAAc,kBA6CnC"}
|
|
@@ -71,6 +71,7 @@ var logColors_1 = require("./logColors");
|
|
|
71
71
|
*
|
|
72
72
|
* --no-install=@some/package,@another/package
|
|
73
73
|
* --no-build=@some/package,@another/package
|
|
74
|
+
* --no-lint=@some/package,@another/package
|
|
74
75
|
* --skip=@some/package,@another/package
|
|
75
76
|
*/
|
|
76
77
|
function buildWorkspace() {
|
|
@@ -89,17 +90,17 @@ function buildWorkspace() {
|
|
|
89
90
|
skippedPackages = ['root'];
|
|
90
91
|
filteredPackageNames = sortedPackageNames.filter(function (packageName) {
|
|
91
92
|
var _a;
|
|
92
|
-
return !!((_a = packageMap[packageName].packageJson.scripts) === null || _a === void 0 ? void 0 : _a.build) &&
|
|
93
|
+
return (!!((_a = packageMap[packageName].packageJson.scripts) === null || _a === void 0 ? void 0 : _a.build) &&
|
|
93
94
|
!(args.skip && args.skip.includes(packageName)) &&
|
|
94
|
-
!skippedPackages.includes(packageName);
|
|
95
|
+
!skippedPackages.includes(packageName));
|
|
95
96
|
});
|
|
96
|
-
logger.info("> Installing and
|
|
97
|
+
logger.info("> Installing, building, and linting ".concat(cw.color("".concat(filteredPackageNames.length), logColors_1.secondaryLogColor), " package").concat(filteredPackageNames.length != 1 ? 's' : '', " in workspace (").concat(workspacePath, ")"));
|
|
97
98
|
logger.debug("packageMap:\n".concat(JSON.stringify(packageMap, null, 2)), true);
|
|
98
99
|
logger.debug("filteredPackageNames:\n".concat(JSON.stringify(filteredPackageNames, null, 2)), true);
|
|
99
100
|
_i = 0, filteredPackageNames_1 = filteredPackageNames;
|
|
100
101
|
_b.label = 2;
|
|
101
102
|
case 2:
|
|
102
|
-
if (!(_i < filteredPackageNames_1.length)) return [3 /*break*/,
|
|
103
|
+
if (!(_i < filteredPackageNames_1.length)) return [3 /*break*/, 11];
|
|
103
104
|
packageName = filteredPackageNames_1[_i];
|
|
104
105
|
localPackage = packageMap[packageName];
|
|
105
106
|
packageDir = path.dirname(localPackage.filePath);
|
|
@@ -120,10 +121,20 @@ function buildWorkspace() {
|
|
|
120
121
|
logger.info("Built ".concat(cw.color(packageName), " (").concat(packageDir, ")"));
|
|
121
122
|
_b.label = 7;
|
|
122
123
|
case 7:
|
|
124
|
+
if (!(!args.noLint || !args.noLint.includes(packageName))) return [3 /*break*/, 10];
|
|
125
|
+
return [4 /*yield*/, (0, util_node_1.cmd)('npx', ['prettier', '.', '--write'], { cwd: packageDir }, { logPrefix: "[".concat(cw.color(packageName), "] ") })];
|
|
126
|
+
case 8:
|
|
127
|
+
_b.sent();
|
|
128
|
+
return [4 /*yield*/, (0, util_node_1.cmd)('npx', ['eslint', '.', '--fix'], { cwd: packageDir }, { logPrefix: "[".concat(cw.color(packageName), "] ") })];
|
|
129
|
+
case 9:
|
|
130
|
+
_b.sent();
|
|
131
|
+
logger.info("Linted ".concat(cw.color(packageName), " (").concat(packageDir, ")"));
|
|
132
|
+
_b.label = 10;
|
|
133
|
+
case 10:
|
|
123
134
|
_i++;
|
|
124
135
|
return [3 /*break*/, 2];
|
|
125
|
-
case
|
|
126
|
-
logger.info("> Installed and
|
|
136
|
+
case 11:
|
|
137
|
+
logger.info("> Installed, built, and linted ".concat(cw.color("".concat(filteredPackageNames.length), logColors_1.secondaryLogColor), " package").concat(filteredPackageNames.length != 1 ? 's' : '', " in workspace (").concat(workspacePath, ")"));
|
|
127
138
|
return [2 /*return*/];
|
|
128
139
|
}
|
|
129
140
|
});
|
|
@@ -135,12 +146,18 @@ function getArgs() {
|
|
|
135
146
|
var argsMap = (0, util_node_1.parseArgsMap)(process.argv.slice(2));
|
|
136
147
|
for (var argName in argsMap) {
|
|
137
148
|
var argValue = argsMap[argName];
|
|
138
|
-
if (argName == 'no-install' && typeof argValue === 'string')
|
|
149
|
+
if (argName == 'no-install' && typeof argValue === 'string') {
|
|
139
150
|
args.noInstall = argValue.split(',');
|
|
140
|
-
|
|
151
|
+
}
|
|
152
|
+
else if (argName == 'no-build' && typeof argValue === 'string') {
|
|
141
153
|
args.noBuild = argValue.split(',');
|
|
142
|
-
|
|
154
|
+
}
|
|
155
|
+
else if (argName == 'no-lint' && typeof argValue === 'string') {
|
|
156
|
+
args.noLint = argValue.split(',');
|
|
157
|
+
}
|
|
158
|
+
else if (argName == 'skip' && typeof argValue === 'string') {
|
|
143
159
|
args.skip = argValue.split(',');
|
|
160
|
+
}
|
|
144
161
|
}
|
|
145
162
|
return args;
|
|
146
163
|
}
|