-
Notifications
You must be signed in to change notification settings - Fork 63
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 #848 from aws-amplify/main
chore: release codegen packages
- Loading branch information
Showing
26 changed files
with
666 additions
and
41 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,8 @@ | ||
version: 0.2 | ||
env: | ||
shell: bash | ||
git-credential-helper: yes | ||
phases: | ||
build: | ||
commands: | ||
- source ./shared-scripts.sh && _deprecate |
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,14 @@ | ||
version: 0.2 | ||
env: | ||
shell: bash | ||
compute-type: BUILD_GENERAL1_SMALL | ||
|
||
batch: | ||
fast-fail: false | ||
build-graph: | ||
- identifier: install_linux | ||
buildspec: .codebuild/install_linux.yml | ||
- identifier: deprecate | ||
buildspec: .codebuild/deprecate.yml | ||
depend-on: | ||
- install_linux |
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 @@ | ||
version: 0.2 | ||
env: | ||
shell: bash | ||
phases: | ||
build: | ||
commands: | ||
- source ./shared-scripts.sh && _installLinux | ||
artifacts: | ||
files: | ||
- 'shared-scripts.sh' |
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,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
custom_registry_url=http://localhost:4873 | ||
default_verdaccio_package=verdaccio@4.5.1 | ||
[email protected].2 | ||
|
||
function startLocalRegistry { | ||
# Start local registry | ||
|
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 @@ | ||
name: Gen 2 Bug Report | ||
description: Create a report to help us improve Amplify Gen 2 Codegen | ||
labels: ['pending-triage'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! | ||
- type: textarea | ||
id: env | ||
attributes: | ||
label: Environment information | ||
description: | | ||
Please copy and paste output of the following command. This will be automatically formatted into code, so no need for backticks. | ||
```bash | ||
npx ampx info | ||
``` | ||
render: plain text | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: env | ||
attributes: | ||
label: Codegen packages | ||
description: | | ||
Please copy and paste output of the following command. This will be automatically formatted into code, so no need for backticks. | ||
```bash | ||
npm list @aws-amplify/graphql-generator | ||
``` | ||
render: plain text | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: | | ||
Describe the bug | ||
How can this bug be reproduced? | ||
Please include any code snippets or screenshots that you think would be helpful! | ||
validations: | ||
required: true |
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
.github/ISSUE_TEMPLATE/1.bug_report.yaml → ...hub/ISSUE_TEMPLATE/2.gen1_bug_report.yaml
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Feature request | ||
description: Suggest an idea for the Amplify Codegen | ||
labels: ['pending-triage'] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to submit a feature request! Try to include as much information as you can. | ||
- For **Amplify Backend** issues, please visit [amplify-backend](https://github.com/aws-amplify/amplify-backend/issues/new/choose) | ||
- For **Amplify Hosting** issues, visit [amplify-hosting](https://github.com/aws-amplify/amplify-hosting/issues/new/choose) | ||
- For **Amplify Codegen** issues, visit [amplify-codegen](https://github.com/aws-amplify/amplify-codegen/issues/new/choose) | ||
- type: textarea | ||
attributes: | ||
label: Describe the feature you'd like to request | ||
description: | | ||
A clear and concise description of what you want to happen. Please include **any related issues**, documentation, etc. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the solution you'd like | ||
description: | | ||
A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe alternatives you've considered | ||
description: | | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: | | ||
Add any other use cases or context about the feature request here. Please include any prototype, workaround, reference implementation, etc. | ||
- type: checkboxes | ||
attributes: | ||
label: Is this something that you'd be interested in working on? | ||
options: | ||
- label: 👋 I may be able to implement this feature request | ||
- type: checkboxes | ||
attributes: | ||
label: Would this feature include a breaking change? | ||
options: | ||
- label: ⚠️ This feature might incur a breaking change |
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,5 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: I want help writing my Amplify application | ||
url: https://discord.com/invite/amplify | ||
about: Check out the `*-help` channels on Amplify's community Discord to ask your questions about building applications with the CLI or other Amplify libraries. |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { EOL } from 'os'; | ||
import { NpmClient } from './npm_client.js'; | ||
import { releaseTagToNameAndVersion } from './release_tag_to_name_and_version'; | ||
|
||
type DistTagMoveAction = { | ||
/** | ||
* An NPM dist-tag | ||
*/ | ||
distTag: string; | ||
/** | ||
* This is a string of the form <packageName>@<version> | ||
*/ | ||
releaseTag: string; | ||
}; | ||
|
||
/** | ||
* Handles moving npm dist-tags from one package version to another | ||
*/ | ||
export class DistTagMover { | ||
/** | ||
* Initialize with an npmClient | ||
*/ | ||
constructor(private readonly npmClient: NpmClient) {} | ||
|
||
/** | ||
* Given a list of sourceReleaseTags and destReleaseTags, | ||
* any npm dist-tags that are pointing to a sourceReleaseTag will be moved to point to the corresponding destReleaseTag | ||
*/ | ||
moveDistTags = async (sourceReleaseTags: string[], destReleaseTags: string[]) => { | ||
const moveActions: DistTagMoveAction[] = []; | ||
|
||
for (const sourceReleaseTag of sourceReleaseTags) { | ||
const { packageName, version: sourceVersion } = releaseTagToNameAndVersion(sourceReleaseTag); | ||
|
||
const { 'dist-tags': distTags } = await this.npmClient.getPackageInfo(sourceReleaseTag); | ||
|
||
Object.entries(distTags).forEach(([tagName, versionAtTag]) => { | ||
if (versionAtTag !== sourceVersion) { | ||
return; | ||
} | ||
const destReleaseTag = destReleaseTags.find(releaseTag => releaseTag.includes(packageName)); | ||
if (!destReleaseTag) { | ||
console.warn(`No corresponding destination release tag found for ${sourceReleaseTag}. latest tag not moved.`); | ||
} else { | ||
moveActions.push({ | ||
releaseTag: destReleaseTag, | ||
distTag: tagName, | ||
}); | ||
} | ||
}); | ||
} | ||
|
||
for (const { distTag, releaseTag } of moveActions) { | ||
console.log(`Moving dist tag "${distTag}" to release tag ${releaseTag}`); | ||
await this.npmClient.setDistTag(releaseTag, distTag); | ||
console.log(`Done!${EOL}`); | ||
} | ||
}; | ||
} |
Oops, something went wrong.