FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular-cli/scripts/packages.mts at v21.2.24 · angular/angular-cli · GitHub
angular
angular-cli
Repository navigation
Code
Issues
213
(213)
Pull requests
20
(20)
Actions
Security and quality
6
(6)
Insights
Expand file tree
Breadcrumbs
angular-cli
/
scripts
/
packages.mts
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (40 loc) · 1.34 KB
Breadcrumbs
angular-cli
/
scripts
/
packages.mts
Copy path
File metadata and controls
48 lines (40 loc) · 1.34 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/**
*
@license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import
fastGlob
from
'fast-glob'
;
import
{
readFileSync
}
from
'node:fs'
;
import
{
dirname
}
from
'node:path'
;
export
interface
PackageInfo
{
name
:
string
;
root
:
string
;
deprecated
?:
{
version
:
string
;
message
:
string
;
}
;
experimental
:
boolean
;
packageJson
:
Record
<
string
,
boolean
|
number
|
string
|
object
>
;
}
function
getPackages
(
)
:
PackageInfo
[
]
{
const
packages
:
PackageInfo
[
]
=
[
]
;
const
monorepoData
=
JSON
.
parse
(
readFileSync
(
'./.monorepo.json'
,
'utf-8'
)
)
;
for
(
const
pkg
of
fastGlob
.
sync
(
'./packages/*/*/package.json'
,
{
absolute
:
true
}
)
)
{
const
packageJson
=
JSON
.
parse
(
readFileSync
(
pkg
,
'utf-8'
)
)
;
if
(
!
(
packageJson
.
name
in
monorepoData
.
packages
)
)
{
throw
new
Error
(
`
${
packageJson
.
name
}
does not exist in .monorepo.json`
)
;
}
packages
.
push
(
{
name
:
packageJson
.
name
,
experimental
:
!
!
packageJson
.
experimental
,
deprecated
:
monorepoData
.
packages
[
packageJson
.
name
]
.
deprecated
,
root
:
dirname
(
pkg
)
,
packageJson
,
}
)
;
}
return
packages
;
}
export
const
packages
=
getPackages
(
)
;
export
const
releasePackages
=
packages
.
filter
(
(
{
packageJson
}
)
=>
!
packageJson
.
private
)
;
Back
|
FazBrowse Home
|
New Git URL