File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ releases :
2
+ " @yarnpkg/core " : patch
3
+
4
+ declined :
5
+ - " @yarnpkg/plugin-compat"
6
+ - " @yarnpkg/plugin-constraints"
7
+ - " @yarnpkg/plugin-dlx"
8
+ - " @yarnpkg/plugin-essentials"
9
+ - " @yarnpkg/plugin-exec"
10
+ - " @yarnpkg/plugin-file"
11
+ - " @yarnpkg/plugin-git"
12
+ - " @yarnpkg/plugin-github"
13
+ - " @yarnpkg/plugin-http"
14
+ - " @yarnpkg/plugin-init"
15
+ - " @yarnpkg/plugin-interactive-tools"
16
+ - " @yarnpkg/plugin-jsr"
17
+ - " @yarnpkg/plugin-link"
18
+ - " @yarnpkg/plugin-nm"
19
+ - " @yarnpkg/plugin-npm"
20
+ - " @yarnpkg/plugin-npm-cli"
21
+ - " @yarnpkg/plugin-pack"
22
+ - " @yarnpkg/plugin-patch"
23
+ - " @yarnpkg/plugin-pnp"
24
+ - " @yarnpkg/plugin-pnpm"
25
+ - " @yarnpkg/plugin-stage"
26
+ - " @yarnpkg/plugin-typescript"
27
+ - " @yarnpkg/plugin-version"
28
+ - " @yarnpkg/plugin-workspace-tools"
29
+ - " @yarnpkg/builder"
30
+ - " @yarnpkg/cli"
31
+ - " @yarnpkg/doctor"
32
+ - " @yarnpkg/extensions"
33
+ - " @yarnpkg/nm"
34
+ - " @yarnpkg/pnpify"
35
+ - " @yarnpkg/sdks"
Original file line number Diff line number Diff line change @@ -523,6 +523,9 @@ export class Manifest {
523
523
if ( typeof data . publishConfig . registry === `string` )
524
524
this . publishConfig . registry = data . publishConfig . registry ;
525
525
526
+ if ( typeof data . publishConfig . provenance === `boolean` )
527
+ this . publishConfig . provenance = data . publishConfig . provenance ;
528
+
526
529
if ( typeof data . publishConfig . bin === `string` ) {
527
530
if ( this . name !== null ) {
528
531
this . publishConfig . bin = new Map ( [ [ this . name . name , normalizeSlashes ( data . publishConfig . bin ) ] ] ) ;
Original file line number Diff line number Diff line change @@ -55,4 +55,21 @@ describe(`Manifest`, () => {
55
55
expect ( manifest . exportTo ( { } ) . bin ) . toEqual ( { bin2 : `./bin2.js` } ) ;
56
56
} ) ;
57
57
} ) ;
58
+
59
+ describe ( `publishConfig` , ( ) => {
60
+ it ( `should parse provenance field when set to true` , ( ) => {
61
+ const manifest = Manifest . fromText ( `{ "publishConfig": { "provenance": true } }` ) ;
62
+ expect ( manifest . publishConfig ?. provenance ) . toBe ( true ) ;
63
+ } ) ;
64
+
65
+ it ( `should parse provenance field when set to false` , ( ) => {
66
+ const manifest = Manifest . fromText ( `{ "publishConfig": { "provenance": false } }` ) ;
67
+ expect ( manifest . publishConfig ?. provenance ) . toBe ( false ) ;
68
+ } ) ;
69
+
70
+ it ( `should ignore non-boolean provenance values` , ( ) => {
71
+ const manifest = Manifest . fromText ( `{ "publishConfig": { "provenance": "true" } }` ) ;
72
+ expect ( manifest . publishConfig ?. provenance ) . toBeUndefined ( ) ;
73
+ } ) ;
74
+ } ) ;
58
75
} ) ;
You can’t perform that action at this time.
0 commit comments