npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

azure-track2-js-sdk-release-tools

v0.1.32

Published

This package contains 3 tools: 1. Use Track2 Codegen to generate codes by inputting swagger, and then run `rush update & rush build`. 2. Use Track2 Codegen to generate codes in swagger pipeline. 3. Generate changelog and bump version for Azure Track2 J

Downloads

4

Readme

Azure Track2 JS SDK Tools

This package contains 3 tools:

  1. Use Track2 Codegen to generate codes by inputting swagger, and then run rush update & rush build.
  2. Use Track2 Codegen to generate codes in swagger pipeline.
  3. Generate changelog and bump version for Azure Track2 JS SDK.

Install

npm install -g azure-track2-js-sdk-release-tools

Tools

Use Track2 Codegen to generate codes by inputting swagger

You can use this command to generate codes, and then run rush update, rush build, and pack the generated codes.

cd azure-sdk-for-js
track2-codegen-automation --use=@autorest/[email protected] --readme=../azure-rest-api-specs/specification/iotspaces/resource-manager/readme.md

hint: you can change the readme to yours.

Use Track2 Codegen to generate codes in swagger pipeline

This command is only used in swagger pipeline.

cd azure-sdk-for-js
track2-codegen-automation-for-pipeline --inputJsonPath=a.json --outputJsonPath=b.json --use=@autorest/[email protected]

Generate changelog and bump version for Azure Track2 JS SDK

This tool is used to generate changelog and bump version automatically.

####Prerequisites This tools is based on the api.md file generated by API Extractor. So make sure the sdk package contains the api.md file

How to Use

cd azure-sdk-for-js
track2-js-sdk-changelog-tool ${package-path}

example:

track2-js-sdk-changelog-tool sdk/compute/arm-compute

Overview - How Changelog Tool Works

In order to compute this changelog, we do the following steps:

  1. Input the package path.
  2. Get the package name and download the latest release from NPM.
  3. If not found it in NPM, it's first release and generate changelog for first release. If found it, check whether package in npm is track2.
  4. If the npm package is track1, generated changelog for migrating track1 to track2. If not, generate change log by compare api.md extracted by API Extractor.
  5. Changelog Tool parses the typescript blocks in the api.md to ASTs, and extracts useful information from the ASTs.
  6. Changelog Tool compares extracted information and generates the changelog.
Convert the TypeScript Block in api.md to AST And Extract Useful information from the AST

The data structure of the extracted information:

export class TSExportedMetaData {
    public typeAlias = {};
    public operationInterface = {};
    public modelInterface = {};
    public enums = {};
    public classes = {};
}

This is an example of the extracted information:

{
  "typeAlias": {
    "AttachedDatabaseConfiguration": {
      "type": {
        "inherits": [
          "ProxyResource"
        ],
        "typeLiteralDeclarations": [
          {
            "properties": [
              {
                "name": "location",
                "visibility": 2,
                "type": "string",
                "isOptional": true,
                "isStatic": false,
                "start": 290,
                "end": 308
              }              
            ],
            "methods": [],
            "intersectionDeclarations": [],
            "typeLiteralDeclarations": [],
            "name": "",
            "start": 284,
            "end": 606
          }
        ],
        "name": "",
        "start": 268,
        "end": 606
      },
      "methods": [],
      "name": "AttachedDatabaseConfiguration",
      "isExported": true,
      "start": 224,
      "end": 607
    }
  }
}
Compare Extracted Information And Generate the Changelog

we have a set of rules that we apply for each entry in the diff. Currently template rules are:

## Features

Added operation group {}
Added operation {}.{}
Added Interface {}
Added Class {}
Added Type Alias {}
Interface {} has a new optional parameter {}
Class {} has a new optional parameter {}
Add parameters of {} to TypeAlias {}
Type Alias {} has a new parameter {}
Added Enum {}
Enum {} has a new value {}

## Breaking Changes

Removed operation group {}
Removed operation {}.{}
Operation {}.{} has a new signature
Class {} has a new signature
Interface {} no longer has parameter {}
Interface {} has a new required parameter {}
Parameter {} of interface {} is now required
Class {} no longer has parameter {}
Class {} has a new required parameter {}
Parameter {} of class {} is now required
Delete parameters of {} in TypeAlias {}
Type Alias {} no longer has parameter {}
Type Alias {} has a new parameter {}
Parameter {} of Type Alias {} is now required
Removed Enum {}
Enum {} no longer has value None