-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3559 from eemeli/fix-2070
[node-core-libary] Require at least a "name" field in package.json files
- Loading branch information
Showing
6 changed files
with
160 additions
and
8 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@rushstack/node-core-library/fix-2070_2022-07-28-18-09.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@rushstack/node-core-library", | ||
"comment": "Update `PackageJsonLookup` to only resolve to `package.json` files that contain a `\"name\"` field. See GitHub issue #2070", | ||
"type": "patch" | ||
} | ||
], | ||
"packageName": "@rushstack/node-core-library" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
libraries/node-core-library/src/test/test-data/example-subdir-package-no-name/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "example-package", | ||
"nonstandardField": 456 | ||
} |
29 changes: 29 additions & 0 deletions
29
...s/node-core-library/src/test/test-data/example-subdir-package-no-name/src/ExampleFile.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. | ||
// See LICENSE in the project root for license information. | ||
|
||
/** | ||
* AEDoc for AliasClass | ||
* @public | ||
*/ | ||
export class AliasClass { | ||
private readOnlyNumber: number; | ||
|
||
/** | ||
* AEDoc for aliasFunc() | ||
* @internal | ||
*/ | ||
public _aliasFunc(): void { | ||
console.log('this is an internal API'); | ||
} | ||
|
||
public aliasField: number; | ||
|
||
public get shouldBeReadOnly(): number { | ||
return this.readOnlyNumber; | ||
} | ||
} | ||
|
||
class PrivateAliasClass { | ||
public test(): void { | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ries/node-core-library/src/test/test-data/example-subdir-package-no-name/src/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"nonstandardField": 123 | ||
} |