-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: officially expose testing helpers (#5958)
* feat: officially expose testing helpers * Change files * docs: improve testing helper code docs * test: trying to fix react wrapper tests * Change files * update typescript to 4.7.0-beta * fix type error in router configuration * fixing foundation compile error * all packages passing build * add export paths to fast-element * fixing reat-wrapper testing infrastructure * fixing test in fast-website * fixing color-explorer test * fixing figma-plugin tests * fixing dev server * fixing fast-website dev * fixing error generating docs * add description for utility * Change files Co-authored-by: Rob Eisenberg <[email protected]> Co-authored-by: EisenbergEffect <[email protected]> Co-authored-by: nicholasrice <[email protected]>
- Loading branch information
1 parent
caaa685
commit e8ebe88
Showing
94 changed files
with
698 additions
and
1,278 deletions.
There are no files selected for viewing
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,25 @@ | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
|
||
/** | ||
* Resolves the directory of the package.json for a given dependency. | ||
* @param {string} name - the package name | ||
* @returns | ||
* | ||
* @description | ||
* NodeJS exports fields prevent arbitrarily resolving files in a package | ||
* that are not explicitly enumerated in the exports field of the package. | ||
* This function provides a mechanism to resolve the package 'root' by package name, | ||
* allowing file-system retrieval by relative path for arbitrary files outside of | ||
* Node's module system. | ||
*/ | ||
exports.getPackageJsonDir = name => { | ||
const entry = require.resolve(name).toString(); | ||
let dir = path.parse(entry).dir; | ||
|
||
while (!fs.existsSync(path.resolve(dir, "package.json"))) { | ||
dir = path.parse(dir).dir; | ||
} | ||
|
||
return dir; | ||
}; |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-fast-animation-efc14f99-1d56-4d8c-b2e6-043b5956c2cd.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,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Upgrade TypeScript", | ||
"packageName": "@microsoft/fast-animation", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-fast-colors-f2f14417-861b-44a9-82a9-e7de4bbd6f8d.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,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Upgrade TypeScript", | ||
"packageName": "@microsoft/fast-colors", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-fast-element-aa287070-7fbe-4d0f-ae38-a5896cc6647f.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,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Upgrade TypeScript", | ||
"packageName": "@microsoft/fast-element", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-fast-foundation-55555b76-e6a2-4b30-8b77-7f61b3bcdd36.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,7 @@ | ||
{ | ||
"type": "major", | ||
"comment": "feat: officially expose testing helpers", | ||
"packageName": "@microsoft/fast-foundation", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-fast-react-wrapper-37b603eb-bb2c-48ee-9ed4-d9ee5f901f0e.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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "test: updating to latest foundation helpers", | ||
"packageName": "@microsoft/fast-react-wrapper", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-fast-router-2ba6bca0-ca84-447c-9115-82409fad661f.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,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Upgrade TypeScript", | ||
"packageName": "@microsoft/fast-router", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-fast-web-utilities-61d860c2-ecab-49a6-9474-10d04397cd24.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,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Upgrade TypeScript", | ||
"packageName": "@microsoft/fast-web-utilities", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
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
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
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
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
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 |
---|---|---|
@@ -1,9 +1,3 @@ | ||
{ | ||
"extends": ["@microsoft/eslint-config-fast-dna", "prettier"], | ||
"rules": { | ||
"import/extensions": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
"extends": ["@microsoft/eslint-config-fast-dna", "prettier"] | ||
} |
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
File renamed without changes.
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
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
Oops, something went wrong.