Skip to content

Latest commit

 

History

History
168 lines (112 loc) · 8.03 KB

File metadata and controls

168 lines (112 loc) · 8.03 KB

@kubernetes-models/apimachinery

2.0.2

Patch Changes

2.0.1

Patch Changes

2.0.0

Major Changes

  • #199 10ca286 Thanks @tommy351! - If you import files from the _schemas directory, please note that addSchema function is replaced with validate function, and their behavior is totally different. You can follow the example below to migrate your code.

    // Before
    import { validate } from "@kubernetes-models/validate";
    import { addSchema } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta";
    
    addSchema();
    validate("io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", { foo: "bar" });
    
    // After
    import { runValidateFunc } from "@kubernetes-models/validate";
    import validate from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta";
    
    runValidateFunc(validate, { foo: "bar" });

Minor Changes

  • #199 d076453 Thanks @tommy351! - Pre-compile OpenAPI schema into a validate function. This should improve the performance of first-time validation, but the package size will slightly increase.

Patch Changes

1.2.2

Patch Changes

1.2.1

Patch Changes

1.2.0

Minor Changes

Patch Changes

1.1.1

Patch Changes

  • 9816d36 Thanks @tommy351! - Replace non-index files with wildcard pattern (*) in export map.

    // Before
    {
      "exports": {
        "./_schemas/IoK8sApimachineryPkgApiResourceQuantity": {},
        "./_schemas/IoK8sApimachineryPkgApisMetaV1APIGroup": {}
      }
    }
    
    // After
    {
      "exports": {
        "./_schemas/*": {}
      }
    }
  • 767314d Thanks @tommy351! - Simplify export map.

    // Before
    {
      "exports": {
        "import": {
          "types": "./dist/index.d.ts",
          "default": "./dist/index.mjs"
        },
        "require": {
          "types": "./dist/index.d.ts",
          "default": "./dist/index.js"
        }
      }
    }
    
    // After
    {
      "exports": {
        "types": "./dist/index.d.ts",
        "import": "./dist/index.mjs",
        "require": "./dist/index.js"
      }
    }
  • Updated dependencies [767314d]:

1.1.0

Minor Changes

  • #81 ef175ce Thanks @tommy351! - Enum types was removed in the last version because they are removed from OpenAPI spec in kubernetes models after v1.24.0 (PR #109178). In order to bring back enum types, I manually generated OpenAPI spec files and stored them in tommy351/kubernetes-openapi-spec repository.

1.0.0

Major Changes

Minor Changes

Patch Changes

0.2.0

Minor Changes

0.1.0

Minor Changes

Patch Changes