Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into openai-to-typespec-cs…
Browse files Browse the repository at this point in the history
…harp-rename
  • Loading branch information
RodgeFu committed Mar 12, 2024
2 parents cc05750 + 746b972 commit dd22a54
Show file tree
Hide file tree
Showing 30 changed files with 203 additions and 167 deletions.
76 changes: 47 additions & 29 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,69 @@
name: "Code scanning - action"
name: "CodeQL"

on:
push:
branches: ["main", "release/*"]
pull_request:
branches: ["main", "release/*"]
schedule:
- cron: "0 19 * * 0"
- cron: "30 3 * * 3"

jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["javascript-typescript"]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

#- run: |
# make bootstrap
# make release
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"changes": [
{
"packageName": "@autorest/openapi-to-typespec",
"comment": "Improve data-plane tspconfig",
"comment": "fix wrong client lib import name",
"type": "patch"
}
],
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions packages/apps/autorest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
},
"typings": "./dist/exports.d.ts",
"devDependencies": {
"@autorest/configuration": "~1.12.0",
"@autorest/core": "~3.10.1",
"@autorest/configuration": "~1.12.1",
"@autorest/core": "~3.10.2",
"@autorest/common": "~1.6.0",
"@azure-tools/async-io": "~3.0.0",
"@azure-tools/extension": "~3.7.1",
Expand Down
23 changes: 23 additions & 0 deletions packages/extensions/core/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
{
"name": "@autorest/core",
"entries": [
{
"version": "3.10.2",
"tag": "@autorest/core_v3.10.2",
"date": "Wed, 28 Feb 2024 18:02:21 GMT",
"comments": {
"patch": [
{
"comment": "Fix: Crash when deduplication paths"
},
{
"comment": "Fix: Crash reporting zero exit code when a plugin report a crash but send invalid exception"
}
],
"dependency": [
{
"comment": "Updating dependency \"@autorest/configuration\" from `~1.12.0` to `~1.12.1`"
},
{
"comment": "Updating dependency \"@azure-tools/deduplication\" from `~3.2.0` to `~3.2.1`"
}
]
}
},
{
"version": "3.10.1",
"tag": "@autorest/core_v3.10.1",
Expand Down
10 changes: 9 additions & 1 deletion packages/extensions/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Change Log - @autorest/core

This log was last generated on Tue, 28 Nov 2023 19:02:52 GMT and should not be manually modified.
This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified.

## 3.10.2
Wed, 28 Feb 2024 18:02:21 GMT

### Patches

- Fix: Crash when deduplication paths
- Fix: Crash reporting zero exit code when a plugin report a crash but send invalid exception

## 3.10.1
Tue, 28 Nov 2023 19:02:52 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/extensions/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/core",
"version": "3.10.1",
"version": "3.10.2",
"description": "AutoRest Core Module",
"engines": {
"node": ">=12.0.0"
Expand Down Expand Up @@ -43,13 +43,13 @@
"typings": "./dist/exports.d.ts",
"devDependencies": {
"@autorest/common": "~1.6.0",
"@autorest/configuration": "~1.12.0",
"@autorest/configuration": "~1.12.1",
"@autorest/schemas": "~1.3.5",
"@autorest/test-utils": "~0.6.0",
"@azure-tools/async-io": "~3.0.0",
"@azure-tools/codegen": "~2.10.0",
"@azure-tools/datastore": "~4.8.0",
"@azure-tools/deduplication": "~3.2.0",
"@azure-tools/deduplication": "~3.2.1",
"@azure-tools/extension": "~3.7.1",
"@azure-tools/json": "~1.3.0",
"@azure-tools/jsonschema": "~1.3.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/extensions/core/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ async function main() {
// - doing the inversion (instanceof Error) doesn't reliably work since that seems to return false on Errors marshalled from safeEval
if (e instanceof Exception) {
logger.log({ level: "error", message: e.message });
exitCode = e.exitCode;
if (e.exitCode) {
exitCode = e.exitCode;
}
}
if (e !== false) {
logger.log({ level: "error", message: `!${e}` });
Expand Down
47 changes: 47 additions & 0 deletions packages/extensions/openapi-to-typespec/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,53 @@
{
"name": "@autorest/openapi-to-typespec",
"entries": [
{
"version": "0.7.0",
"tag": "@autorest/openapi-to-typespec_v0.7.0",
"date": "Wed, 28 Feb 2024 18:02:21 GMT",
"comments": {
"minor": [
{
"comment": "Add support for custom resource, enhance doc conversion and fix default value issue"
},
{
"comment": "Initial Support for ARM in OpenAPI to TypeSpec Conversion"
},
{
"comment": "Support Auth"
},
{
"comment": "Support new location resource expression, support new flatten decorator and fix doc escape problem."
}
],
"patch": [
{
"comment": "Add feature and fix bug for converter."
},
{
"comment": "Fix validation issues for converter"
},
{
"comment": "use different base parameter for different resource"
},
{
"comment": "Add a flag to disable conversion feature for backcomp"
},
{
"comment": "migrate `@projectedName` to `@encodedName`"
},
{
"comment": "fix default value of array and remove default value of duration temporarily"
},
{
"comment": "Change to use raw operation for non-resource operations for ARM"
},
{
"comment": "Improve data-plane tspconfig"
}
]
}
},
{
"version": "0.6.0",
"tag": "@autorest/openapi-to-cadl_v0.6.0",
Expand Down
Loading

0 comments on commit dd22a54

Please sign in to comment.