Skip to content

Commit

Permalink
Merge branch 'main' into fix_malformed_multipart_body
Browse files Browse the repository at this point in the history
  • Loading branch information
shemogumbe authored Oct 16, 2024
2 parents 07ec691 + 255b504 commit f349dca
Show file tree
Hide file tree
Showing 379 changed files with 21,468 additions and 18,796 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @baywet @darrelmiller @zengin @MichaelMainer @ddyett @gavinbarron @koros @andrueastman
* @microsoft/kiota-write
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

- package-ecosystem: npm
directory: "/packages/abstractions"
Expand All @@ -34,6 +37,9 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

- package-ecosystem: npm
directory: "/packages/authentication/azure"
Expand All @@ -47,6 +53,9 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

- package-ecosystem: npm
directory: "/packages/serialization/form"
Expand All @@ -60,6 +69,9 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

- package-ecosystem: npm
directory: "/packages/serialization/multipart"
Expand All @@ -73,6 +85,9 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

- package-ecosystem: npm
directory: "/packages/serialization/json"
Expand All @@ -86,6 +101,9 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

- package-ecosystem: npm
directory: "/packages/serialization/text"
Expand All @@ -99,6 +117,9 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

- package-ecosystem: npm
directory: "/packages/http/fetch"
Expand All @@ -112,6 +133,9 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

- package-ecosystem: npm
directory: "/packages/test"
Expand All @@ -125,3 +149,7 @@ updates:
eslint:
patterns:
- "*eslint*"
vitest:
patterns:
- "*vitest*"

43 changes: 43 additions & 0 deletions .github/policies/kiota-typescript-branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

name: kiota-typescript-branch-protection
description: Branch protection policy for the kiota-typescript repository
resource: repository
configuration:
branchProtectionRules:

- branchNamePattern: main
# This branch pattern applies to the following branches as of 06/09/2023 14:08:44:
# dev

# Specifies whether this branch can be deleted. boolean
allowsDeletions: false
# Specifies whether forced pushes are allowed on this branch. boolean
allowsForcePushes: false
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
dismissStaleReviews: true
# Specifies whether admins can overwrite branch protection. boolean
isAdminEnforced: false
# Indicates whether "Require a pull request before merging" is enabled. boolean
requiresPullRequestBeforeMerging: true
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
requiredApprovingReviewsCount: 1
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
requireCodeOwnersReview: true
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
requiresCommitSignatures: false
# Are conversations required to be resolved before merging? boolean
requiresConversationResolution: true
# Are merge commits prohibited from being pushed to this branch. boolean
requiresLinearHistory: false
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
requiredStatusChecks:
- license/cla
- check-typescript-version-matrix
# Require branches to be up to date before merging. This should be false since the repo contains autogenerated files. boolean
requiresStrictStatusChecks: false
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
restrictsPushes: false
# Restrict who can dismiss pull request reviews. boolean
restrictsReviewDismissals: false
8 changes: 4 additions & 4 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ configuration:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
label: 'status:waiting-for-author-feedback'
- hasLabel:
label: 'Status: No Recent Activity'
- noActivitySince:
Expand All @@ -31,7 +31,7 @@ configuration:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
label: 'status:waiting-for-author-feedback'
- noActivitySince:
days: 4
- isNotLabeledWith:
Expand Down Expand Up @@ -64,13 +64,13 @@ configuration:
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'Needs: Author Feedback'
label: 'status:waiting-for-author-feedback'
- isOpen
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'Needs: Author Feedback'
label: 'status:waiting-for-author-feedback'
description:
- if:
- payloadType: Issues
Expand Down
3 changes: 3 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
manifest: true
primaryBranch: main
handleGHRelease: true
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
140 changes: 75 additions & 65 deletions .github/workflows/build_test_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,70 +7,80 @@ on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
environment:
name: build_test
env:
TENANT_ID: ${{ secrets.TENANT_ID }}
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: .\scripts\updateVersion.ps1
shell: pwsh
working-directory: ./
- run: npm ci
- run: npm install -g [email protected]
- run: npm run build
- name: Archive dist folders # archive dist folders to verify if they are transpiled correctly and available for publishing
uses: actions/upload-artifact@v4
with:
name: dist folders ${{ matrix.node-version }}
path: |
packages/abstractions/dist
packages/serialization/form/dist
packages/serialization/json/dist
packages/serialization/multipart/dist
packages/serialization/text/dist
packages/http/fetch/dist
packages/authentication/azure/dist
- run: npx lerna run test:integrated
if: ${{env.TENANT_ID != '' }}
env:
TENANT_ID: ${{secrets.tenant_id}}
CLIENT_ID: ${{secrets.client_id}}
CLIENT_SECRET: ${{secrets.client_secret}}
USER_ID: "813956a3-4a30-4596-914f-bfd86a657a09"
- run: npx lerna run test --parallel

publish-npm:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'auto dependabot')}}
needs: build
environment:
name: production_feed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: |
git config --global user.name '${GITHUB_ACTOR}'
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GIT_USERNAME }}
- run: npm ci
- run: npm run build
- run: npx lerna publish from-package --yes
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
build:
runs-on: ubuntu-latest
environment:
name: build_test
env:
TENANT_ID: ${{ secrets.TENANT_ID }}
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run lint:eslint:loud
- run: npm run prettier:check
- name: Archive dist folders # archive dist folders to verify if they are transpiled correctly and available for publishing
uses: actions/upload-artifact@v4
with:
name: dist folders ${{ matrix.node-version }}
path: |
packages/abstractions/dist
packages/serialization/form/dist
packages/serialization/json/dist
packages/serialization/multipart/dist
packages/serialization/text/dist
packages/http/fetch/dist
packages/authentication/azure/dist
- run: npm run test:integrated
if: ${{env.TENANT_ID != '' }}
env:
TENANT_ID: ${{secrets.tenant_id}}
CLIENT_ID: ${{secrets.client_id}}
CLIENT_SECRET: ${{secrets.client_secret}}
USER_ID: ${{secrets.user_id}}
- run: npm run test

publish-npm:
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'chore: release main') }}"
needs: build
environment:
name: production_feed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: |
git config --global user.name '${GITHUB_ACTOR}'
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GIT_USERNAME }}
- run: npm ci
- run: npm run build
- run: npx lerna publish from-package --yes
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

# The check-typescript-version-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
check-typescript-version-matrix:
runs-on: ubuntu-latest
needs: [build]
if: always()
steps:
- name: All build matrix options are successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: One or more build matrix options failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/scripts
packages/**/*/lib/
packages/**/*.js
packages/**/*.js.map
packages/**/*.d.ts
**/generatedCode/**
Loading

0 comments on commit f349dca

Please sign in to comment.