Skip to content

Commit

Permalink
Verify api file path and enable api-extractor for abort-controller (A…
Browse files Browse the repository at this point in the history
…zure#13861)

* Verify api file path and enable api-extractor for abort-controller
  • Loading branch information
praveenkuttappan authored Feb 27, 2021
1 parent 0740493 commit f3661fc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
27 changes: 18 additions & 9 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -220,19 +220,28 @@ function Find-javascript-Artifacts-For-Apireview($artifactDir, $packageName = ""
[regex]$pattern = "azure-"
$pkgName = $pattern.replace($packageName, "", 1)
$packageDir = Join-Path $artifactDir $pkgName "temp"
Write-Host "Searching for *.api.json in path $($packageDir)"
$files = Get-ChildItem "${packageDir}" | Where-Object -FilterScript { $_.Name.EndsWith(".api.json") }
if (!$files)
if (Test-Path $packageDir)
{
Write-Host "$($packageDir) does not have api review json for package"
return $null
Write-Host "Searching for *.api.json in path $($packageDir)"
$files = Get-ChildItem "${packageDir}" | Where-Object -FilterScript { $_.Name.EndsWith(".api.json") }
if (!$files)
{
Write-Host "$($packageDir) does not have api review json for package"
Write-Host "API Extractor must be enabled for $($packageName). Please ensure api-extractor.json is present in package directory and api extract script included in build script"
return $null
}
elseif ($files.Count -ne 1)
{
Write-Host "$($packageDir) should contain only one api review for $($packageName)"
Write-Host "No of Packages $($files.Count)"
return $null
}
}
elseif ($files.Count -ne 1)
else
{
Write-Host "$($packageDir) should contain only one api review for $($packageName)"
Write-Host "No of Packages $($files.Count)"
Write-Host "$($pkgName) does not have api review json"
return $null
}
}

$packages = @{
$files[0].Name = $files[0].FullName
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/abort-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build:nodebrowser": "rollup -c 2>&1",
"build:types": "downlevel-dts types/src types/3.1",
"build:test": "rollup -c rollup.test.config.js 2>&1",
"build": "npm run build:es6 && npm run build:nodebrowser && npm run build:types",
"build": "npm run build:es6 && npm run build:nodebrowser && npm run build:types && npm run extract-api",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"clean": "rimraf dist dist-esm dist-test types temp dist-browser/*.js* dist-browser/*.zip statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml",
"execute:samples": "echo skipped",
Expand Down
11 changes: 6 additions & 5 deletions sdk/core/abort-controller/review/abort-controller.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class AbortController {
constructor(parentSignals?: AbortSignalLike[]);
constructor(...parentSignals: AbortSignalLike[]);
abort(): void;
readonly signal: AbortSignal;
get signal(): AbortSignal;
static timeout(ms: number): AbortSignal;
}

Expand All @@ -21,10 +21,11 @@ export class AbortError extends Error {
// @public
export class AbortSignal implements AbortSignalLike {
constructor();
readonly aborted: boolean;
get aborted(): boolean;
addEventListener(_type: "abort", listener: (this: AbortSignalLike, ev: any) => any): void;
static readonly none: AbortSignal;
onabort?: (ev?: Event) => any;
dispatchEvent(_event: Event): boolean;
static get none(): AbortSignal;
onabort: ((ev?: Event) => any) | null;
removeEventListener(_type: "abort", listener: (this: AbortSignalLike, ev: any) => any): void;
}

Expand All @@ -38,4 +39,4 @@ export interface AbortSignalLike {

// (No @packageDocumentation comment for this package)

```
```

0 comments on commit f3661fc

Please sign in to comment.