forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12,291 changed files
with
1,293,858 additions
and
591,149 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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,10 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@fluentui/scripts-babel/preset-v9", | ||
{ | ||
"tsBaseConfigPath": "./tsconfig.base.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"buildCommand": "build:codesandbox", | ||
"packages": ["packages/react"], | ||
"sandboxes": ["x5u3t"], | ||
"node": "12" | ||
"packages": ["packages/react", "packages/react-components/react-components"], | ||
"sandboxes": ["x5u3t", "spnyu"], | ||
"node": "18" | ||
} |
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,6 @@ | ||
ARG VARIANT=18-bookworm | ||
# https://github.com/devcontainers/images/tree/main/src/typescript-node | ||
FROM mcr.microsoft.com/devcontainers/typescript-node:1-${VARIANT} | ||
|
||
# Cypress linux pre-requisites https://docs.cypress.io/guides/getting-started/installing-cypress#Linux-Prerequisites | ||
RUN apt-get update && apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb |
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,42 @@ | ||
# Dev Container | ||
|
||
This configuration is based on the base Node container provided by VSCode, it should work out of the box for most users. | ||
|
||
> For more information on how to use/create `development containers` follow the [VSCode Documentation](https://code.visualstudio.com/docs/remote/create-dev-container) | ||
> See here for more information on the base container https://github.com/microsoft/vscode-dev-containers/blob/main/containers/javascript-node/.devcontainer/base.Dockerfile | ||
## Cypress tests | ||
|
||
To run Cypress in dev containers some additional configuration is required, since Cypress depends on opening a browser (which requires GUI), a `DISPLAY` Environment Variable should be exported by the host to tell docker how to properly run GUI. Follow the instructions bellow to add to host OS the required software. | ||
|
||
> ⚠️ You should rebuild the container every time your IP address changes if you want to run Cypress tests | ||
### WSL2 | ||
|
||
1. Install [VcXsrv](https://sourceforge.net/projects/vcxsrv) | ||
2. Run the XLaunch application, then in it's application menu you'll find a Preferences choice. In the Preferences make this setting: | ||
- Allow connections from network clients | ||
> This opens the display so it accepts XServer connections from any non-local computer. The Docker container we're about to create counts - as would a Linux machine in your office. | ||
3. export `DISPLAY` Environment Variable somewhere (e.g `.bashrc`, `.zshrc`) | ||
```bash | ||
# get your IP Address | ||
IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}') | ||
export DISPLAY = $IP:0 | ||
``` | ||
|
||
### MacOS | ||
|
||
1. Install [XQuartz](https://www.xquartz.org/) | ||
2. Run the XQuartz application, then in it's application menu you'll find a Preferences choice. In the Preferences make this setting: | ||
- Allow connections from network clients. | ||
> This opens the display so it accepts X11 connections from any non-local computer. The Docker container we're about to create counts - as would a Linux machine in your office. | ||
3. Save `DISPLAY` and `IP` environment variables somewhere (e.g: `.bashrc`, `.zshrc`) | ||
```bash | ||
export IP = $(ipconfig getifaddr en0) # en0 or eth0... might vary depending on your WI-FI/Cable connection | ||
export DISPLAY = $IP:0 | ||
``` | ||
4. With XQuartz **NOT** running run this once to add IP address: | ||
```bash | ||
xhost +$IP | ||
``` |
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,21 @@ | ||
{ | ||
"name": "Node.js", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"VARIANT": "18-bookworm" | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/github-cli:1": {} | ||
}, | ||
"containerEnv": { | ||
// Required Environment Variable to properly run Cypress | ||
"DISPLAY": "${localEnv:DISPLAY}" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] | ||
} | ||
} | ||
} |
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,48 @@ | ||
steps: | ||
- template: tools.yml | ||
|
||
- task: Bash@3 | ||
inputs: | ||
filePath: yarn-ci.sh | ||
displayName: yarn (install packages) | ||
|
||
- script: | | ||
yarn nx run @fluentui/workspace-plugin:check-graph | ||
yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify | ||
yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify | ||
displayName: Workspace lint | ||
- script: | | ||
# @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, thus it needs to be build in advance | ||
yarn workspace @fluentui/api-docs build | ||
# @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance | ||
yarn workspace @fluentui/digest build | ||
yarn tsc -p ./tsconfig.json | ||
displayName: Type-check just.config.ts files | ||
- script: | | ||
yarn check:installed-dependencies-versions | ||
displayName: 'check packages: installed dependencies versions' | ||
- script: | | ||
if [[ -n "$(targetBranch)" ]]; then | ||
yarn format --since $(targetBranch) --check | ||
else | ||
yarn format --all --check | ||
fi | ||
displayName: check formatting | ||
## Danger.js checks for Fluent UI N* | ||
- script: | | ||
DANGER_DISABLE_TRANSPILATION="true" yarn danger ci | ||
displayName: danger | ||
condition: eq(variables.isPR, true) | ||
env: | ||
DANGER_GITHUB_API_TOKEN: $(DANGER_GITHUB_API_TOKEN) | ||
- script: | | ||
yarn buildci $(sinceArg) | ||
displayName: build, test, lint, test-ssr | ||
- template: cleanup.yml |
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,18 +1,18 @@ | ||
parameters: | ||
- name: checkForChangedFiles | ||
- name: checkForModifiedFiles | ||
type: boolean | ||
default: true | ||
|
||
steps: | ||
- script: | | ||
npm run check-for-changed-files | ||
condition: ${{ parameters.checkForChangedFiles }} | ||
displayName: check for changed files | ||
yarn check:modified-files | ||
condition: ${{ parameters.checkForModifiedFiles }} | ||
displayName: 'check: modified files' | ||
# In theory the "workspace: clean: all" setting should handle this, but it doesn't always seem to work. | ||
# ReallyClean is a custom task from our internal UI Fabric azure-devops-tasks repo which attempts to | ||
# delete the given directory with multiple retries. | ||
- task: ReallyClean@0 | ||
inputs: | ||
directory: $(Agent.BuildDirectory) | ||
condition: always() | ||
# - task: ReallyClean@0 | ||
# inputs: | ||
# directory: $(Agent.BuildDirectory) | ||
# condition: always() |
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,46 @@ | ||
steps: | ||
- template: tools.yml | ||
|
||
- task: Bash@3 | ||
inputs: | ||
filePath: yarn-ci.sh | ||
displayName: yarn | ||
|
||
# this also builds FUI N* docs if appropriate | ||
- script: | | ||
yarn bundle $(sinceArg) | ||
displayName: bundle | ||
- script: | | ||
yarn lage build-storybook --verbose $(sinceArg) | ||
displayName: build Storybooks | ||
## This runs regardless of scope, the app will adapt to the scope as well | ||
- script: | | ||
yarn workspace @fluentui/pr-deploy-site generate:site | ||
displayName: generate PR Deploy Site | ||
- task: AzureUpload@2 | ||
displayName: Upload PR deploy site | ||
inputs: | ||
azureSubscription: $(azureSubscription) | ||
BlobPrefix: $(deployBasePath) | ||
ContainerName: '$web' | ||
SourcePath: 'apps/pr-deploy-site/dist' | ||
storage: $(azureStorage) | ||
|
||
- task: GithubPRStatus@0 | ||
displayName: 'Update PR deploy site github status' | ||
inputs: | ||
githubOwner: microsoft | ||
githubRepo: fluentui | ||
githubContext: 'Pull request demo site' | ||
githubDescription: 'Click "Details" to go to the deployed demo site for this pull request' | ||
# This MUST have a trailing slash, or the links to PR deploy site assets won't work | ||
githubTargetLink: $(deployUrl)/ | ||
|
||
- script: | | ||
yarn e2e $(sinceArg) | ||
displayName: Cypress E2E tests | ||
- template: cleanup.yml |
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,57 @@ | ||
parameters: | ||
- name: fluentVersion | ||
type: string | ||
default: v8 | ||
- name: vrTestPackageName | ||
type: string | ||
default: '@fluentui/vr-tests' | ||
- name: vrTestPackagePath | ||
type: string | ||
default: 'apps/vr-tests' | ||
|
||
steps: | ||
- task: Bash@3 | ||
inputs: | ||
filePath: yarn-ci.sh | ||
displayName: yarn (install packages) | ||
|
||
- script: | | ||
isPR=${{lower(eq(variables['Build.Reason'], 'PullRequest'))}} | ||
echo $isPR | ||
if [[ $isPR == true ]]; then | ||
packageAffected=$(yarn --silent check:affected --package ${{ parameters.vrTestPackageName }}) | ||
if [[ $packageAffected == false ]]; then | ||
echo "In PR pipeline but NOT affecting test package. Skipping test run" | ||
echo "##vso[task.setvariable variable=vrTestSkip;]yes" | ||
else | ||
echo "In PR pipeline and affecting test package. NOT Skipping test run" | ||
echo "##vso[task.setvariable variable=vrTestSkip;]no" | ||
fi | ||
else | ||
echo "Not in PR pipeline. NOT Skipping test run" | ||
echo "##vso[task.setvariable variable=vrTestSkip;]no" | ||
fi | ||
displayName: Check if vrTests should be skipped | ||
- script: | | ||
yarn workspace ${{ parameters.vrTestPackageName }} vr:build | ||
displayName: Build VR tests components package | ||
condition: eq(variables['vrTestSkip'], 'no') | ||
- script: | | ||
yarn workspace ${{ parameters.vrTestPackageName }} vr:test --verbose | ||
displayName: 'Run VR tests' | ||
condition: eq(variables['vrTestSkip'], 'no') | ||
- script: | | ||
mkdir -p screenshots | ||
cp -rf ${{ parameters.vrTestPackagePath }}/dist/screenshots/*.png screenshots/ | ||
displayName: Collate Artifacts | ||
condition: eq(variables['vrTestSkip'], 'no') | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
PathtoPublish: 'screenshots' | ||
ArtifactName: 'vrscreenshot${{ parameters.fluentVersion }}' | ||
publishLocation: 'Container' | ||
condition: eq(variables['vrTestSkip'], 'no') |
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,2 +1,5 @@ | ||
# Ignore yarn binary from Languages bar - see https://github.com/github/linguist | ||
.yarn/releases/*.js linguist-vendored | ||
|
||
# API files should be checked in with Unix-style newlines | ||
*.api.md text=auto |
Oops, something went wrong.