Skip to content

Commit

Permalink
Merge branch 'main' into treits/fix/jest-component-disconnected-callback
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner-reits authored Apr 14, 2023
2 parents bfa93bb + 6c5c984 commit eb18e2d
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use.
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft && github.event.pull_request.user.type != 'Bot' }}
steps:
- uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/workflows/actions/auto-request-reviews
with:
orgReadToken: ${{ secrets.READORG_GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
dev-version: ${{ steps.get-dev-version.outputs.DEV_VERSION }}
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/workflows/actions/publish-npm
with:
tag: dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
nightly-version: ${{ steps.get-nightly-version.outputs.NIGHTLY_VERSION }}
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/workflows/actions/publish-npm
with:
tag: nightly
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tech-debt-burndown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout main
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
ref: main
if: ${{ matrix.branch == 'main' }}

- name: Checkout PR branch
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use.
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main`
Expand Down Expand Up @@ -58,13 +58,13 @@ jobs:
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout main
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
ref: main
if: ${{ matrix.branch == 'main' }}

- name: Checkout PR branch
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use.
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main`
Expand All @@ -90,7 +90,7 @@ jobs:
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout current branch
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use.
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# GitHub Actions 'concurrency' field as means to block the job until no other tests are running.
concurrency: run_browserstack_queue
steps:
- uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.number) || '' }}
persist-credentials: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-bundlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-component-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
Expand Down
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions scripts/release-prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function promptRelease(opts: BuildOptions): Promise<NormalizedRelea
name: 'confirm',
message: (answers: any) => {
const tagToUse = determineAnsweredTagToUse(answers);
const tagPart = ` and tag this release in npm as ${color.yellow(tagToUse)}`;
const tagPart = tagToUse ? ` and tag this release in npm as ${color.yellow(tagToUse)}` : '';
return `Will publish ${opts.vermoji} ${color.yellow(opts.version)}${tagPart}. Continue?`;
},
},
Expand Down Expand Up @@ -144,8 +144,8 @@ export async function promptRelease(opts: BuildOptions): Promise<NormalizedRelea
* answers is to be used.
*
* @param answers user provided answers to pick from
* @returns the tag to use. defaults to 'UNKNOWN' if the tag cannot be determined.
* @returns the tag to use. defaults to `null` if no tag was specified
*/
export function determineAnsweredTagToUse(answers: ReleasePromptAnswers): string {
return answers.tag ? answers.tag : answers.specifiedTag ? answers.specifiedTag : 'UNKNOWN';
export function determineAnsweredTagToUse(answers: ReleasePromptAnswers): string | null {
return answers.specifiedTag || answers.tag || null;
}
12 changes: 7 additions & 5 deletions scripts/test/release-prompts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { determineAnsweredTagToUse, ReleasePromptAnswers } from '../release-prom

describe('determineAnsweredTagToUse', () => {
it.each<[ReleasePromptAnswers, string]>([
[{ tag: '1.0.0', specifiedTag: '2.0.0', confirm: true, otp: '' }, '1.0.0'],
[{ tag: '1.0.0', specifiedTag: '2.0.0', confirm: true, otp: '' }, '2.0.0'],
[{ tag: '1.0.0', confirm: true, otp: '' }, '1.0.0'],
[{ specifiedTag: '2.0.0', confirm: true, otp: '' }, '2.0.0'],
[{ tag: '', specifiedTag: '', confirm: true, otp: '' }, 'UNKNOWN'],
[{ tag: '', confirm: true, otp: '' }, 'UNKNOWN'],
[{ specifiedTag: '', confirm: true, otp: '' }, 'UNKNOWN'],
[{ confirm: true, otp: '' }, 'UNKNOWN'],
[{ tag: undefined, specifiedTag: '2.0.0', confirm: true, otp: '' }, '2.0.0'],
[{ tag: null, specifiedTag: '2.0.0', confirm: true, otp: '' }, '2.0.0'],
[{ tag: '', specifiedTag: '', confirm: true, otp: '' }, null],
[{ tag: '', confirm: true, otp: '' }, null],
[{ specifiedTag: '', confirm: true, otp: '' }, null],
[{ confirm: true, otp: '' }, null],
])('%s returns "%s"', (answers, expected) => {
expect(determineAnsweredTagToUse(answers)).toBe(expected);
});
Expand Down

0 comments on commit eb18e2d

Please sign in to comment.