Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependencies (non-major) #13

Merged
merged 1 commit into from
Dec 23, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 2, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@babel/core (source) ^7.20.5 -> ^7.20.7 age adoption passing confidence
@babel/plugin-proposal-object-rest-spread (source) ^7.20.2 -> ^7.20.7 age adoption passing confidence
@babel/types (source) ^7.20.5 -> ^7.20.7 age adoption passing confidence
@rollup/plugin-commonjs (source) ^23.0.4 -> ^23.0.7 age adoption passing confidence
@rollup/plugin-replace (source) ^5.0.1 -> ^5.0.2 age adoption passing confidence
@rollup/plugin-terser (source) ^0.2.0 -> ^0.2.1 age adoption passing confidence
esbuild ^0.16.3 -> ^0.16.10 age adoption passing confidence
esbuild-register ^3.4.1 -> ^3.4.2 age adoption passing confidence
rollup (source) ^3.7.1 -> ^3.8.1 age adoption passing confidence
rxjs (source) ^7.6.0 -> ^7.8.0 age adoption passing confidence
zod ^3.19.1 -> ^3.20.2 age adoption passing confidence

Release Notes

babel/babel

v7.20.7

Compare Source

👓 Spec Compliance
  • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
  • babel-helpers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes, babel-plugin-transform-object-super
🐛 Bug Fix
  • babel-parser, babel-plugin-transform-typescript
  • babel-traverse
  • babel-plugin-transform-typescript, babel-traverse
  • babel-plugin-transform-block-scoping
  • babel-plugin-proposal-async-generator-functions, babel-preset-env
  • babel-generator, babel-plugin-proposal-optional-chaining
  • babel-plugin-transform-react-jsx, babel-types
  • babel-core, babel-helpers, babel-plugin-transform-computed-properties, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
  • babel-generator
💅 Polish
🏠 Internal
  • babel-helper-define-map, babel-plugin-transform-property-mutators
  • babel-core, babel-plugin-proposal-class-properties, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-plugin-transform-destructuring, babel-plugin-transform-parameters, babel-plugin-transform-regenerator, babel-plugin-transform-runtime, babel-preset-env, babel-traverse
🏃‍♀️ Performance
rollup/plugins (@​rollup/plugin-commonjs)

v23.0.7

Compare Source

2022-12-17

Bugfixes
  • fix: produce code which works when __esModule is already defined #​1379

v23.0.6

Compare Source

2022-12-17

Bugfixes

v23.0.5

Compare Source

2022-12-15

Bugfixes
  • fix: resolve export exports not found #​1363
rollup/plugins (@​rollup/plugin-replace)

v5.0.2

Compare Source

2022-12-17

Bugfixes
rollup/plugins (@​rollup/plugin-terser)

v0.2.1

Compare Source

2022-12-21

Bugfixes
evanw/esbuild

v0.16.10

Compare Source

  • Change the default "legal comment" behavior again (#​2745)

    The legal comments feature automatically gathers comments containing @license or @preserve and puts the comments somewhere (either in the generated code or in a separate file). This behavior used to be on by default but was disabled by default in version 0.16.0 because automatically inserting comments is potentially confusing and misleading. These comments can appear to be assigning the copyright of your code to another entity. And this behavior can be especially problematic if it happens automatically by default since you may not even be aware of it happening. For example, if you bundle the TypeScript compiler the preserving legal comments means your source code would contain this comment, which appears to be assigning the copyright of all of your code to Microsoft:

    /*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0
    
    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.
    
    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */

    However, people have asked for this feature to be re-enabled by default. To resolve the confusion about what these comments are applying to, esbuild's default behavior will now be to attempt to describe which package the comments are coming from. So while this feature has been re-enabled by default, the output will now look something like this instead:

    /*! Bundled license information:
    
    typescript/lib/typescript.js:
      (*! *****************************************************************************
      Copyright (c) Microsoft Corporation. All rights reserved.
      Licensed under the Apache License, Version 2.0 (the "License"); you may not use
      this file except in compliance with the License. You may obtain a copy of the
      License at http://www.apache.org/licenses/LICENSE-2.0
    
      THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
      KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
      WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
      MERCHANTABLITY OR NON-INFRINGEMENT.
    
      See the Apache Version 2.0 License for specific language governing permissions
      and limitations under the License.
      ***************************************************************************** *)
    */

    Note that you can still customize this behavior with the --legal-comments= flag. For example, you can use --legal-comments=none to turn this off, or you can use --legal-comments=linked to put these comments in a separate .LEGAL.txt file instead.

  • Enable external legal comments with the transform API (#​2390)

    Previously esbuild's transform API only supported none, inline, or eof legal comments. With this release, external legal comments are now also supported with the transform API. This only applies to the JS and Go APIs, not to the CLI, and looks like this:

    • JS:

      const { code, legalComments } = await esbuild.transform(input, {
        legalComments: 'external',
      })
    • Go:

      result := api.Transform(input, api.TransformOptions{
        LegalComments: api.LegalCommentsEndOfFile,
      })
      code := result.Code
      legalComments := result.LegalComments
  • Fix duplicate function declaration edge cases (#​2757)

    The change in the previous release to forbid duplicate function declarations in certain cases accidentally forbid some edge cases that should have been allowed. Specifically duplicate function declarations are forbidden in nested blocks in strict mode and at the top level of modules, but are allowed when they are declared at the top level of function bodies. This release fixes the regression by re-allowing the last case.

  • Allow package subpaths with alias (#​2715)

    Previously the names passed to the alias feature had to be the name of a package (with or without a package scope). With this release, you can now also use the alias feature with package subpaths. So for example you can now create an alias that substitutes @org/pkg/lib with something else.

v0.16.9

Compare Source

  • Update to Unicode 15.0.0

    The character tables that determine which characters form valid JavaScript identifiers have been updated from Unicode version 14.0.0 to the newly-released Unicode version 15.0.0. I'm not putting an example in the release notes because all of the new characters will likely just show up as little squares since fonts haven't been updated yet. But you can read https://www.unicode.org/versions/Unicode15.0.0/#Summary for more information about the changes.

  • Disallow duplicate lexically-declared names in nested blocks and in strict mode

    In strict mode or in a nested block, it's supposed to be a syntax error to declare two symbols with the same name unless all duplicate entries are either function declarations or all var declarations. However, esbuild was overly permissive and allowed this when duplicate entries were either function declarations or var declarations (even if they were mixed). This check has now been made more restrictive to match the JavaScript specification:

    // JavaScript allows this
    var a
    function a() {}
    {
      var b
      var b
      function c() {}
      function c() {}
    }
    
    // JavaScript doesn't allow this
    {
      var d
      function d() {}
    }
  • Add a type declaration for the new empty loader (#​2755)

    I forgot to add this in the previous release. It has now been added.

    This fix was contributed by @​fz6m.

  • Add support for the v flag in regular expression literals

    People are currently working on adding a v flag to JavaScript regular expresions. You can read more about this flag here: https://v8.dev/features/regexp-v-flag. This release adds support for parsing this flag, so esbuild will now no longer consider regular expression literals with this flag to be a syntax error. If the target is set to something other than esnext, esbuild will transform regular expression literals containing this flag into a new RegExp() constructor call so the resulting code doesn't have a syntax error. This enables you to provide a polyfill for RegExp that implements the v flag to get your code to work at run-time. While esbuild doesn't typically adopt proposals until they're already shipping in a real JavaScript run-time, I'm adding it now because a) esbuild's implementation doesn't need to change as the proposal evolves, b) this isn't really new syntax since regular expression literals already have flags, and c) esbuild's implementation is a trivial pass-through anyway.

  • Avoid keeping the name of classes with static name properties

    The --keep-names property attempts to preserve the original value of the name property for functions and classes even when identifiers are renamed by the minifier or to avoid a name collision. This is currently done by generating code to assign a string to the name property on the function or class object. However, this should not be done for classes with a static name property since in that case the explicitly-defined name property overwrites the automatically-generated class name. With this release, esbuild will now no longer attempt to preserve the name property for classes with a static name property.

v0.16.8

Compare Source

  • Allow plugins to resolve injected files (#​2754)

    Previously paths passed to the inject feature were always interpreted as file system paths. This meant that onResolve plugins would not be run for them and esbuild's default path resolver would always be used. This meant that the inject feature couldn't be used in the browser since the browser doesn't have access to a file system. This release runs paths passed to inject through esbuild's full path resolution pipeline so plugins now have a chance to handle them using onResolve callbacks. This makes it possible to write a plugin that makes esbuild's inject work in the browser.

  • Add the empty loader (#​1541, #​2753)

    The new empty loader tells esbuild to pretend that a file is empty. So for example --loader:.css=empty effectively skips all imports of .css files in JavaScript so that they aren't included in the bundle, since import "./some-empty-file" in JavaScript doesn't bundle anything. You can also use the empty loader to remove asset references in CSS files. For example --loader:.png=empty causes esbuild to replace asset references such as url(image.png) with url() so that they are no longer included in the resulting style sheet.

  • Fix </script> and </style> escaping for non-default targets (#​2748)

    The change in version 0.16.0 to give control over </script> escaping via --supported:inline-script=false or --supported:inline-script=true accidentally broke automatic escaping of </script> when an explicit target setting is specified. This release restores the correct automatic escaping of </script> (which should not depend on what target is set to).

  • Enable the exports field with NODE_PATHS (#​2752)

    Node has a rarely-used feature where you can extend the set of directories that node searches for packages using the NODE_PATHS environment variable. While esbuild supports this too, previously it only supported the old main field path resolution but did not support the new exports field package resolution. This release makes the path resolution rules the same again for both node_modules directories and NODE_PATHS directories.

v0.16.7

Compare Source

  • Include file loader strings in metafile imports (#​2731)

    Bundling a file with the file loader copies that file to the output directory and imports a module with the path to the copied file in the default export. Previously when bundling with the file loader, there was no reference in the metafile from the JavaScript file containing the path string to the copied file. With this release, there will now be a reference in the metafile in the imports array with the kind file-loader:

     {
       ...
       "outputs": {
         "out/image-55CCFTCE.svg": {
           ...
         },
         "out/entry.js": {
           "imports": [
    +        {
    +          "path": "out/image-55CCFTCE.svg",
    +          "kind": "file-loader"
    +        }
           ],
           ...
         }
       }
     }
  • Fix byte counts in metafile regarding references to other output files (#​2071)

    Previously files that contained references to other output files had slightly incorrect metadata for the byte counts of input files which contributed to that output file. So for example if app.js imports image.png using the file loader and esbuild generates out.js and image-LSAMBFUD.png, the metadata for how many bytes of out.js are from app.js was slightly off (the metadata for the byte count of out.js was still correct). The reason is because esbuild substitutes the final paths for references between output files toward the end of the build to handle cyclic references, and the byte counts needed to be adjusted as well during the path substitution. This release fixes these byte counts (specifically the bytesInOutput values).

  • The alias feature now strips a trailing slash (#​2730)

    People sometimes add a trailing slash to the name of one of node's built-in modules to force node to import from the file system instead of importing the built-in module. For example, importing util imports node's built-in module called util but importing util/ tries to find a package called util on the file system. Previously attempting to use esbuild's package alias feature to replace imports to util with a specific file would fail because the file path would also gain a trailing slash (e.g. mapping util to ./file.js turned util/ into ./file.js/). With this release, esbuild will now omit the path suffix if it's a single trailing slash, which should now allow you to successfully apply aliases to these import paths.

v0.16.6

Compare Source

  • Do not mark subpath imports as external with --packages=external (#​2741)

    Node has a feature called subpath imports where special import paths that start with # are resolved using the imports field in the package.json file of the enclosing package. The intent of the newly-added --packages=external setting is to exclude a package's dependencies from the bundle. Since a package's subpath imports are only accessible within that package, it's wrong for them to be affected by --packages=external. This release changes esbuild so that --packages=external no longer affects subpath imports.

  • Forbid invalid numbers in JSON files

    Previously esbuild parsed numbers in JSON files using the same syntax as JavaScript. But starting from this release, esbuild will now parse them with JSON syntax instead. This means the following numbers are no longer allowed by esbuild in JSON files:

    • Legacy octal literals (non-zero integers starting with 0)
    • The 0b, 0o, and 0x numeric prefixes
    • Numbers containing _ such as 1_000
    • Leading and trailing . such as 0. and .0
    • Numbers with a space after the - such as - 1
  • Add external imports to metafile (#​905, #​1768, #​1933, #​1939)

    External imports now appear in imports arrays in the metafile (which is present when bundling with metafile: true) next to normal imports, but additionally have external: true to set them apart. This applies both to files in the inputs section and the outputs section. Here's an example:

     {
       "inputs": {
         "style.css": {
           "bytes": 83,
           "imports": [
    +        {
    +          "path": "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css",
    +          "kind": "import-rule",
    +          "external": true
    +        }
           ]
         },
         "app.js": {
           "bytes": 100,
           "imports": [
    +        {
    +          "path": "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js",
    +          "kind": "import-statement",
    +          "external": true
    +        },
             {
               "path": "style.css",
               "kind": "import-statement"
             }
           ]
         }
       },
       "outputs": {
         "out/app.js": {
           "imports": [
    +        {
    +          "path": "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js",
    +          "kind": "require-call",
    +          "external": true
    +        }
           ],
           "exports": [],
           "entryPoint": "app.js",
           "cssBundle": "out/app.css",
           "inputs": {
             "app.js": {
               "bytesInOutput": 113
             },
             "style.css": {
               "bytesInOutput": 0
             }
           },
           "bytes": 528
         },
         "out/app.css": {
           "imports": [
    +        {
    +          "path": "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css",
    +          "kind": "import-rule",
    +          "external": true
    +        }
           ],
           "inputs": {
             "style.css": {
               "bytesInOutput": 0
             }
           },
           "bytes": 100
         }
       }
     }

    One additional useful consequence of this is that the imports array is now populated when bundling is disabled. So you can now use esbuild with bundling disabled to inspect a file's imports.

v0.16.5

Compare Source

  • Make it easy to exclude all packages from a bundle (#​1958, #​1975, #​2164, #​2246, #​2542)

    When bundling for node, it's often necessary to exclude npm packages from the bundle since they weren't designed with esbuild bundling in mind and don't work correctly after being bundled. For example, they may use __dirname and run-time file system calls to load files, which doesn't work after bundling with esbuild. Or they may compile a native .node extension that has similar expectations about the layout of the file system that are no longer true after bundling (even if the .node extension is copied next to the bundle).

    The way to get this to work with esbuild is to use the --external: flag. For example, the fsevents package contains a native .node extension and shouldn't be bundled. To bundle code that uses it, you can pass --external:fsevents to esbuild to exclude it from your bundle. You will then need to ensure that the fsevents package is still present when you run your bundle (e.g. by publishing your bundle to npm as a package with a dependency on fsevents).

    It was possible to automatically do this for all of your dependencies, but it was inconvenient. You had to write some code that read your package.json file and passed the keys of the dependencies, devDependencies, peerDependencies, and/or optionalDependencies maps to esbuild as external packages (either that or write a plugin to mark all package paths as external). Previously esbuild's recommendation for making this easier was to do --external:./node_modules/* (added in version 0.14.13). However, this was a bad idea because it caused compatibility problems with many node packages as it caused esbuild to mark the post-resolve path as external instead of the pre-resolve path. Doing that could break packages that are published as both CommonJS and ESM if esbuild's bundler is also used to do a module format conversion.

    With this release, you can now do the following to automatically exclude all packages from your bundle:

    • CLI:

      esbuild --bundle --packages=external
      
    • JS:

      esbuild.build({
        bundle: true,
        packages: 'external',
      })
    • Go:

      api.Build(api.BuildOptions{
        Bundle:   true,
        Packages: api.PackagesExternal,
      })

    Doing --external:./node_modules/* is still possible and still has the same behavior, but is no longer recommended. I recommend that you use the new packages feature instead.

  • Fix some subtle bugs with tagged template literals

    This release fixes a bug where minification could incorrectly change the value of this within tagged template literal function calls:

    // Original code
    function f(x) {
      let z = y.z
      return z``
    }
    
    // Old output (with --minify)
    function f(n){return y.z``}
    
    // New output (with --minify)
    function f(n){return(0,y.z)``}

    This release also fixes a bug where using optional chaining with --target=es2019 or earlier could incorrectly change the value of this within tagged template literal function calls:

    // Original code
    var obj = {
      foo: function() {
        console.log(this === obj);
      }
    };
    (obj?.foo)``;
    
    // Old output (with --target=es6)
    var obj = {
      foo: function() {
        console.log(this === obj);
      }
    };
    (obj == null ? void 0 : obj.foo)``;
    
    // New output (with --target=es6)
    var __freeze = Object.freeze;
    var __defProp = Object.defineProperty;
    var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
    var _a;
    var obj = {
      foo: function() {
        console.log(this === obj);
      }
    };
    (obj == null ? void 0 : obj.foo).call(obj, _a || (_a = __template([""])));
  • Some slight minification improvements

    The following minification improvements were implemented:

    • if (~a !== 0) throw x; => if (~a) throw x;
    • if ((a | b) !== 0) throw x; => if (a | b) throw x;
    • if ((a & b) !== 0) throw x; => if (a & b) throw x;
    • if ((a ^ b) !== 0) throw x; => if (a ^ b) throw x;
    • if ((a << b) !== 0) throw x; => if (a << b) throw x;
    • if ((a >> b) !== 0) throw x; => if (a >> b) throw x;
    • if ((a >>> b) !== 0) throw x; => if (a >>> b) throw x;
    • if (!!a || !!b) throw x; => if (a || b) throw x;
    • if (!!a && !!b) throw x; => if (a && b) throw x;
    • if (a ? !!b : !!c) throw x; => if (a ? b : c) throw x;

v0.16.4

Compare Source

  • Fix binary downloads from the @esbuild/ scope for Deno (#​2729)

    Version 0.16.0 of esbuild moved esbuild's binary executables into npm packages under the @esbuild/ scope, which accidentally broke the binary downloader script for Deno. This release fixes this script so it should now be possible to use esbuild version 0.16.4+ with Deno.

rollup/rollup

v3.8.1

Compare Source

2022-12-23

Bug Fixes
  • Reduce memory footprint when explicitly passing cache: false (#​4762)
  • Fix a crash when preserving modules and reexporting namespaces (#​4766)
Pull Requests

v3.8.0

Compare Source

2022-12-22

Features
  • Deduplicate ESM exports and reexports when preserving modules (#​4759)
Bug Fixes
  • Handle files that are emitted as a side effect of the manualChunks option (#​4759)
Pull Requests

v3.7.5

Compare Source

2022-12-17

Bug Fixes
  • Avoid name shadowing when default exporting a class that matches the name of another class (#​4756)
  • Do not display the error message both in a separate line and in the stack trace in rollup CLI (#​4749)
  • Make type of RollupWarning.cause compatible with Error.cause (#​4757)
  • Do not swallow side effects when interacting with modules namespaces nested in another object (#​4758)
Pull Requests

v3.7.4

Compare Source

2022-12-13

Bug Fixes
  • Do not remove calls to .exec and .test for included stateful regular expressions (#​4742)
Pull Requests

v3.7.3

Compare Source

2022-12-11

Bug Fixes
  • Ensure this.getFileName no longer returns a placeholder as soon as hash placeholders have been resolved (#​4747)
Pull Requests

v3.7.2

Compare Source

2022-12-10

Bug Fixes
  • Improve chunk generation performance when one module is dynamically imported by many other modules (#​4736)
Pull Requests
reactivex/rxjs

v7.8.0

Compare Source

Features
  • buffer: closingNotifier now supports any ObservableInput (#​7073) (61b877a)
  • delayWhen: delayWhen's delayDurationSelector now supports any ObservableInput (#​7049) (dfd95db)
  • sequenceEqual: compareTo now supports any ObservableInput (#​7102) (d501961)
  • share: ShareConfig factory properties now supports any ObservableInput (#​7093) (cc3995a)
  • skipUntil: notifier now supports any ObservableInput (#​7091) (60d6c40)
  • window: windowBoundaries now supports any ObservableInput (#​7088) (8c4347c)

v7.7.0

Compare Source

Features
colinhacks/zod

v3.20.2

Compare Source

Commits:

v3.20.1

Compare Source

Commits:

v3.20.0: -beta

Compare Source

Breaking changes

There are no breaking API changes, however TypeScript versions 4.4 and earlier are no longer officially supported.

New features

The most feature-packed release since Zod 3.0!

.pipe()

A new schema method .pipe() is now available on all schemas. which can be used to chain multiple schemas into a "validation pipeline". Typically this will be used in conjunction with .transform().

z.string()
  .transform(val => val.length)
  .pipe(z.number().min(5))

The .pipe() method returns a ZodPipeline instance.

z.coerce

Zod now provides a more convenient way to coerce primitive values.

const schema = z.coerce.string();
schema.parse("tuna"); // => "tuna"
schema.parse(12); // => "12"
schema.parse(true); // => "true"

During the parsing step, the input is passed through the String() function, which is a JavaScript built-in for coercing data into strings. Note that the returned schema is a ZodString instance so you can use all string methods.

z.coerce.string().email().min(5);

All primitive types support coercion.

z.coerce.string();   // String(input)
z.coerce.number();   // Number(input)
z.coerce.boolean();  // Boolean(input)
z.coerce.bigint();   // BigInt(input)
z.coerce.date();     // new Date(input)
.catch()

A new schema method .catch() is now available on all schemas. It can be used to provide a "catchall" value that will be returned in the event of a parsing error.

const schema = z.string().catch("fallback");

schema.parse("kate"); // => "kate"
schema.parse(4); // => "fallback"

The .catch() method returns a ZodCatch instance.

z.symbol()

A long-missing hole in Zod's type system is finally filled! Thanks @​santosmarco-caribou.

const schema = z.symbol();
schema.parse(Symbol('asdf'));

Relatedly, you can also pass symbols into z.literal().

const TUNA = Symbol("tuna");
const schema = z.literal(TUNA);

schema.parse(TUNA); // Symbol(tuna)
schema.parse(Symbol("nottuna")); // Error
z.string().datetime()

A new method has been added to ZodString to validate ISO datetime strings. Thanks @​samchungy!

z.string().datetime();

This method defaults to only allowing UTC datetimes (the ones that end in "Z"). No timezone offsets are allowed; arbitrary sub-second precision is supported.

const dt = z.string().datetime();
dt.parse("2020-01-01T00:00:00Z"); // 🟢
dt.parse("2020-01-01T00:00:00.123Z"); // 🟢
dt.parse("2020-01-01T00:00:00.123456Z"); // 🟢 (arbitrary precision)
dt.parse("2020-01-01T00:00:00+02:00"); // 🔴 (no offsets allowed)

Offsets can be supported with the offset parameter.

const a = z.string().datetime({ offset: true });
a.parse("2020-01-01T00:00:00+02:00"); // 🟢 offset allowed

You can additionally constrain the allowable precision. This specifies the number of digits that should follow the decimal point.

const b = z.string().datetime({ precision: 3 })
b.parse("2020-01-01T00:00:00.123Z"); // 🟢 precision of 3 decimal points
b.parse("2020-01-01T00:00:00Z"); // 🔴 invalid precision
z.number().finite()

Restrict a number schema to finite values. Thanks @​igalklebanov.

const schema = z.number().finite();
schema.parse(5); 🟢
schema.parse(Infinity); 🔴
schema.parse(-Infinity); 🔴
What's Changed
New Contributors

Configuration

📅 Schedule: Branch creation - "before 2am" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate using a preset from Sanity. View repository job log here

@renovate renovate bot force-pushed the renovate/dependencies-(non-major) branch 10 times, most recently from d0429eb to 6b6c8c2 Compare December 9, 2022 23:31
@renovate renovate bot changed the title fix(deps): update dependencies (non-major) fix(deps): update dependencies (non-major) - autoclosed Dec 10, 2022
@renovate renovate bot closed this Dec 10, 2022
@renovate renovate bot deleted the renovate/dependencies-(non-major) branch December 10, 2022 00:30
@renovate renovate bot changed the title fix(deps): update dependencies (non-major) - autoclosed fix(deps): update dependencies (non-major) Dec 10, 2022
@renovate renovate bot restored the renovate/dependencies-(non-major) branch December 10, 2022 06:15
@renovate renovate bot reopened this Dec 10, 2022
@renovate renovate bot force-pushed the renovate/dependencies-(non-major) branch 12 times, most recently from 69911ea to 0d00de2 Compare December 16, 2022 09:08
@renovate renovate bot force-pushed the renovate/dependencies-(non-major) branch 15 times, most recently from 7d269f9 to 17c020d Compare December 23, 2022 08:40
@renovate renovate bot force-pushed the renovate/dependencies-(non-major) branch from 17c020d to da87017 Compare December 23, 2022 18:57
@renovate renovate bot force-pushed the renovate/dependencies-(non-major) branch from da87017 to 3ec8910 Compare December 23, 2022 19:17
@stipsan stipsan merged commit 192cfd2 into main Dec 23, 2022
@stipsan stipsan deleted the renovate/dependencies-(non-major) branch December 23, 2022 19:24
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant