From 87ffe61c8a579ca194379b88844aaa4c7814ad97 Mon Sep 17 00:00:00 2001 From: Anton Evzhakov Date: Thu, 13 Oct 2022 16:19:31 +0300 Subject: [PATCH] feat(styled): customizable names of generated css variables (closes #1053) (#1079) --- .changeset/stupid-otters-obey.md | 10 ++ docs/CONFIGURATION.md | 29 +++++- packages/atomic/src/processors/styled.ts | 16 +++- packages/core/src/processors/css.ts | 6 +- packages/react/package.json | 1 + packages/react/src/processors/styled.ts | 75 +++++++++++++-- packages/tags/src/TaggedTemplateProcessor.ts | 2 + packages/tags/src/index.ts | 2 + packages/tags/src/utils/buildSlug.ts | 12 +++ .../tags/src/utils/getClassNameAndSlug.ts | 26 +---- packages/tags/src/utils/templateProcessor.ts | 7 +- packages/tags/src/utils/types.ts | 3 +- .../src/__snapshots__/babel.test.ts.snap | 94 ++++++++++++++++++- packages/testkit/src/babel.test.ts | 67 ++++++++++++- packages/utils/src/IVariableContext.ts | 10 ++ packages/utils/src/index.ts | 1 + packages/utils/src/options/types.ts | 6 +- pnpm-lock.yaml | 26 ++--- 18 files changed, 334 insertions(+), 59 deletions(-) create mode 100644 .changeset/stupid-otters-obey.md create mode 100644 packages/tags/src/utils/buildSlug.ts create mode 100644 packages/utils/src/IVariableContext.ts diff --git a/.changeset/stupid-otters-obey.md b/.changeset/stupid-otters-obey.md new file mode 100644 index 000000000..a481e1d35 --- /dev/null +++ b/.changeset/stupid-otters-obey.md @@ -0,0 +1,10 @@ +--- +'@linaria/atomic': patch +'@linaria/core': patch +'@linaria/react': patch +'@linaria/tags': patch +'@linaria/testkit': patch +'@linaria/utils': patch +--- + +The new `variableNameSlug` option that allows to customize css variable names (closes #1053). diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index c3d3f535f..61a1d9f72 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -26,7 +26,7 @@ module.exports = { Enabling this will add a display name to generated class names, e.g. `.Title_abcdef` instead of `.abcdef'. It is disabled by default to generate smaller CSS files. -- `classNameSlug: string | (hash: string, title: string, args: ClassNameSlugVars) => string` (default: `default`): +- `classNameSlug: string | ((hash: string, title: string, args: ClassNameSlugVars) => string)` (default: `default`): Using this will provide an interface to customize the output of the CSS class name. Example: @@ -58,6 +58,33 @@ module.exports = { - `hash`: The hash of the content. - `title`: The name of the class. +- `variableNameSlug: string | ((context: IVariableContext) => string)` (default: `default`): + + Using this will provide an interface to customize the output of the CSS variable name. Example: + + variableNameSlug: '[componentName]-[valueSlug]-[index]', + + Would generate a variable name such as `--Title-absdjfsdf-0` instead of the `@react/styled`'s default `--absdjfsdf-0`. + + You may also use a function to define the slug. The function will be evaluated at build time and must return a string: + + variableNameSlug: (context) => `${context.valueSlug}__${context.componentName}__${context.precedingCss.match(/([\w-]+)\s*:\s*$/)[1]}`, + + Would generate the variable name `--absdjfsdf__Title__flex-direction`. + + **note** invalid characters will be replaced with an underscore (`_`). + + ### Variables + + - `componentName` - the displayName of the component. + - `componentSlug` - the component slug. + - `index` - the index of the css variable in the current component. + - `precedingCss` - the preceding part of the css for the variable, i.e. `flex: 1; flex-direction: `. + - `preprocessor` - the preprocessor used to process the tag (e.g. 'StyledProcessor' or 'AtomicStyledProcessor'). + - `source` - the string source of the css property value. + - `unit` - the unit. + - `valueSlug` - the value slug. + - `rules: EvalRule[]` The set of rules that defines how the matched files will be transformed during the evaluation. diff --git a/packages/atomic/src/processors/styled.ts b/packages/atomic/src/processors/styled.ts index d8be087bd..042032208 100644 --- a/packages/atomic/src/processors/styled.ts +++ b/packages/atomic/src/processors/styled.ts @@ -5,7 +5,6 @@ import type { IProps } from '@linaria/react/processors/styled'; import StyledProcessor from '@linaria/react/processors/styled'; import { hasMeta } from '@linaria/tags'; import type { Rules, ValueCache } from '@linaria/tags'; -import { slugify } from '@linaria/utils'; import atomize from './helpers/atomize'; @@ -67,9 +66,18 @@ export default class AtomicStyledProcessor extends StyledProcessor { return props; } - // eslint-disable-next-line class-methods-use-this - protected override getVariableId(value: string): string { + protected override getVariableId( + source: string, + unit: string, + precedingCss: string + ): string { + const id = this.getCustomVariableId(source, unit, precedingCss); + if (id) { + return id; + } + + const context = this.getVariableContext(source, unit, precedingCss); // id is based on the slugified value - return slugify(value); + return context.valueSlug; } } diff --git a/packages/core/src/processors/css.ts b/packages/core/src/processors/css.ts index d3b31cd62..8d37c1b24 100644 --- a/packages/core/src/processors/css.ts +++ b/packages/core/src/processors/css.ts @@ -5,7 +5,11 @@ import { TaggedTemplateProcessor } from '@linaria/tags'; export default class CssProcessor extends TaggedTemplateProcessor { // eslint-disable-next-line class-methods-use-this - public override addInterpolation(node: unknown, source: string): string { + public override addInterpolation( + node: unknown, + precedingCss: string, + source: string + ): string { throw new Error( `css tag cannot handle '${source}' as an interpolated value` ); diff --git a/packages/react/package.json b/packages/react/package.json index 9222865c3..091c03d28 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -7,6 +7,7 @@ "@emotion/is-prop-valid": "^0.8.8", "@linaria/core": "workspace:^", "@linaria/tags": "workspace:^", + "@linaria/utils": "workspace:^", "ts-invariant": "^0.10.3" }, "devDependencies": { diff --git a/packages/react/src/processors/styled.ts b/packages/react/src/processors/styled.ts index d11c14624..6818e5cc0 100644 --- a/packages/react/src/processors/styled.ts +++ b/packages/react/src/processors/styled.ts @@ -7,18 +7,22 @@ import type { } from '@babel/types'; import type { - Rules, - WrappedNode, - ValueCache, Params, + Rules, TailProcessorParams, + ValueCache, + WrappedNode, } from '@linaria/tags'; import { - TaggedTemplateProcessor, - ValueType, + buildSlug, hasMeta, + TaggedTemplateProcessor, validateParams, + ValueType, + toValidCSSIdentifier, } from '@linaria/tags'; +import type { IVariableContext } from '@linaria/utils'; +import { slugify } from '@linaria/utils'; const isNotNull = (x: T | null): x is T => x !== null; @@ -90,10 +94,11 @@ export default class StyledProcessor extends TaggedTemplateProcessor { public override addInterpolation( node: Expression, + precedingCss: string, source: string, unit = '' ): string { - const id = this.getVariableId(source + unit); + const id = this.getVariableId(source, unit, precedingCss); this.interpolations.push({ id, @@ -215,6 +220,22 @@ export default class StyledProcessor extends TaggedTemplateProcessor { return res(this.component.source); } + protected getCustomVariableId( + source: string, + unit: string, + precedingCss: string + ) { + const context = this.getVariableContext(source, unit, precedingCss); + const customSlugFn = this.options.variableNameSlug; + if (!customSlugFn) { + return undefined; + } + + return typeof customSlugFn === 'function' + ? customSlugFn(context) + : buildSlug(customSlugFn, context); + } + protected getProps(): IProps { const propsObj: IProps = { name: this.displayName, @@ -271,12 +292,46 @@ export default class StyledProcessor extends TaggedTemplateProcessor { return t.objectExpression(propExpressions); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - protected getVariableId(value: string): string { + protected getVariableContext( + source: string, + unit: string, + precedingCss: string + ): IVariableContext { + const getIndex = () => { + // eslint-disable-next-line no-plusplus + return this.#variableIdx++; + }; + + return { + componentName: this.displayName, + componentSlug: this.slug, + get index() { + return getIndex(); + }, + precedingCss, + processor: this.constructor.name, + source, + unit, + valueSlug: slugify(source + unit), + }; + } + + protected getVariableId( + source: string, + unit: string, + precedingCss: string + ): string { + const value = source + unit; if (!this.#variablesCache.has(value)) { + const id = this.getCustomVariableId(source, unit, precedingCss); + if (id) { + return toValidCSSIdentifier(id); + } + + const context = this.getVariableContext(source, unit, precedingCss); + // make the variable unique to this styled component - // eslint-disable-next-line no-plusplus - this.#variablesCache.set(value, `${this.slug}-${this.#variableIdx++}`); + this.#variablesCache.set(value, `${this.slug}-${context.index}`); } return this.#variablesCache.get(value)!; diff --git a/packages/tags/src/TaggedTemplateProcessor.ts b/packages/tags/src/TaggedTemplateProcessor.ts index e4a8aee37..98d3b9076 100644 --- a/packages/tags/src/TaggedTemplateProcessor.ts +++ b/packages/tags/src/TaggedTemplateProcessor.ts @@ -43,12 +43,14 @@ export default abstract class TaggedTemplateProcessor extends BaseProcessor { /** * It is called for each resolved expression in a template literal. * @param node + * @param precedingCss * @param source * @param unit * @return chunk of CSS that should be added to extracted CSS */ public abstract addInterpolation( node: Expression, + precedingCss: string, source: string, unit?: string ): string; diff --git a/packages/tags/src/index.ts b/packages/tags/src/index.ts index c7b82100b..6ec7a1061 100644 --- a/packages/tags/src/index.ts +++ b/packages/tags/src/index.ts @@ -1,8 +1,10 @@ export * from './BaseProcessor'; export * from './types'; +export { buildSlug } from './utils/buildSlug'; export { default as isSerializable } from './utils/isSerializable'; export * from './utils/types'; export * from './utils/validateParams'; export { default as BaseProcessor } from './BaseProcessor'; export { default as TaggedTemplateProcessor } from './TaggedTemplateProcessor'; export { default as hasMeta } from './utils/hasMeta'; +export { default as toValidCSSIdentifier } from './utils/toValidCSSIdentifier'; diff --git a/packages/tags/src/utils/buildSlug.ts b/packages/tags/src/utils/buildSlug.ts new file mode 100644 index 000000000..6fa51df7d --- /dev/null +++ b/packages/tags/src/utils/buildSlug.ts @@ -0,0 +1,12 @@ +const PLACEHOLDER = /\[(.*?)]/g; + +const isValidArgName = ( + key: string | number | symbol, + args: TArgs +): key is keyof TArgs => key in args; + +export function buildSlug(pattern: string, args: TArgs) { + return pattern.replace(PLACEHOLDER, (_, name: string) => + isValidArgName(name, args) ? String(args[name]) : '' + ); +} diff --git a/packages/tags/src/utils/getClassNameAndSlug.ts b/packages/tags/src/utils/getClassNameAndSlug.ts index b64c9fbfd..0d7f1658d 100644 --- a/packages/tags/src/utils/getClassNameAndSlug.ts +++ b/packages/tags/src/utils/getClassNameAndSlug.ts @@ -4,14 +4,10 @@ import { debug } from '@linaria/logger'; import type { ClassNameSlugVars } from '@linaria/utils'; import { slugify } from '@linaria/utils'; +import { buildSlug } from './buildSlug'; import toValidCSSIdentifier from './toValidCSSIdentifier'; import type { IFileContext, IOptions } from './types'; -const isSlugVar = ( - key: string, - slugVars: ClassNameSlugVars -): key is keyof ClassNameSlugVars => key in slugVars; - export default function getClassNameAndSlug( displayName: string, idx: number, @@ -58,23 +54,9 @@ export default function getClassNameAndSlug( } if (typeof options.classNameSlug === 'string') { - const { classNameSlug } = options; - - // Variables that were used in the config for `classNameSlug` - const optionVariables = classNameSlug.match(/\[.*?]/g) || []; - let cnSlug = classNameSlug; - - for (let i = 0, l = optionVariables.length; i < l; i++) { - const v = optionVariables[i].slice(1, -1); // Remove the brackets around the variable name - - // Replace the var if it key and value exist otherwise place an empty string - cnSlug = cnSlug.replace( - `[${v}]`, - isSlugVar(v, slugVars) ? slugVars[v] : '' - ); - } - - className = toValidCSSIdentifier(cnSlug); + className = toValidCSSIdentifier( + buildSlug(options.classNameSlug, slugVars) + ); } debug( diff --git a/packages/tags/src/utils/templateProcessor.ts b/packages/tags/src/utils/templateProcessor.ts index 25a515580..969801d8d 100644 --- a/packages/tags/src/utils/templateProcessor.ts +++ b/packages/tags/src/utils/templateProcessor.ts @@ -117,6 +117,7 @@ export default function templateProcessor( const varId = tagProcessor.addInterpolation( item.ex, + cssText, item.source, unit ); @@ -124,7 +125,11 @@ export default function templateProcessor( cssText += next.value.cooked?.substring(unit?.length ?? 0) ?? ''; } else { - const varId = tagProcessor.addInterpolation(item.ex, item.source); + const varId = tagProcessor.addInterpolation( + item.ex, + cssText, + item.source + ); cssText += `var(--${varId})`; } } catch (e) { diff --git a/packages/tags/src/utils/types.ts b/packages/tags/src/utils/types.ts index 487c89d5c..17ee3dc5a 100644 --- a/packages/tags/src/utils/types.ts +++ b/packages/tags/src/utils/types.ts @@ -1,10 +1,11 @@ import type { TransformOptions } from '@babel/core'; -import type { ClassNameFn } from '@linaria/utils'; +import type { ClassNameFn, VariableNameFn } from '@linaria/utils'; export interface IOptions { classNameSlug?: string | ClassNameFn; displayName: boolean; + variableNameSlug?: string | VariableNameFn; } export type IFileContext = Pick; diff --git a/packages/testkit/src/__snapshots__/babel.test.ts.snap b/packages/testkit/src/__snapshots__/babel.test.ts.snap index 68bc26492..6dcc75fb7 100644 --- a/packages/testkit/src/__snapshots__/babel.test.ts.snap +++ b/packages/testkit/src/__snapshots__/babel.test.ts.snap @@ -1048,7 +1048,7 @@ Dependencies: NA `; -exports[`strategy shaker handles fn passed in as classNameSlug 1`] = ` +exports[`strategy shaker handles fn passed in classNameSlug 1`] = ` "import { styled } from '@linaria/react'; const _exp = /*#__PURE__*/() => \\"h1\\"; @@ -1059,7 +1059,7 @@ export const Title = /*#__PURE__*/styled(_exp())({ });" `; -exports[`strategy shaker handles fn passed in as classNameSlug 2`] = ` +exports[`strategy shaker handles fn passed in classNameSlug 2`] = ` CSS: @@ -1071,6 +1071,49 @@ Dependencies: NA `; +exports[`strategy shaker handles fn passed in variableNameSlug 1`] = ` +"import { styled as atomicStyled } from '@linaria/atomic'; +import { styled } from '@linaria/react'; + +const _exp = /*#__PURE__*/() => \\"h1\\"; + +const _exp2 = /*#__PURE__*/() => props => props.size; + +export const Title = /*#__PURE__*/styled(_exp())({ + name: \\"Title\\", + class: \\"Title_t13jq05\\", + vars: { + \\"_qqvhyq__Title__font-size\\": [_exp2(), \\"px\\"] + } +}); + +const _exp3 = /*#__PURE__*/() => \\"h1\\"; + +const _exp4 = /*#__PURE__*/() => props => props.size; + +export const Body = /*#__PURE__*/atomicStyled(_exp3())({ + name: \\"Body\\", + class: \\"atm_c8_f3y1j4 Body_b1vhermz\\", + vars: { + \\"1qqvhyq__Body__font-size\\": [_exp4(), \\"px\\"] + }, + atomic: true +});" +`; + +exports[`strategy shaker handles fn passed in variableNameSlug 2`] = ` + +CSS: + +.Title_t13jq05 { + font-size: var(--_qqvhyq__Title__font-size); +} +.atm_c8_f3y1j4.atm_c8_f3y1j4{font-size:var(--1qqvhyq__Body__font-size);} + +Dependencies: NA + +`; + exports[`strategy shaker handles indirect wrapping another styled component 1`] = ` "const { styled @@ -2455,7 +2498,7 @@ Dependencies: NA `; -exports[`strategy shaker uses string passed in as classNameSlug 1`] = ` +exports[`strategy shaker uses string passed in classNameSlug 1`] = ` "import { styled } from '@linaria/react'; const _exp = /*#__PURE__*/() => \\"h1\\"; @@ -2466,7 +2509,7 @@ export const Title = /*#__PURE__*/styled(_exp())({ });" `; -exports[`strategy shaker uses string passed in as classNameSlug 2`] = ` +exports[`strategy shaker uses string passed in classNameSlug 2`] = ` CSS: @@ -2478,6 +2521,49 @@ Dependencies: NA `; +exports[`strategy shaker uses string passed in variableNameSlug 1`] = ` +"import { styled as atomicStyled } from '@linaria/atomic'; +import { styled } from '@linaria/react'; + +const _exp = /*#__PURE__*/() => \\"h1\\"; + +const _exp2 = /*#__PURE__*/() => props => props.size; + +export const Title = /*#__PURE__*/styled(_exp())({ + name: \\"Title\\", + class: \\"Title_t13jq05\\", + vars: { + \\"Title_t13jq05_StyledProcessor_1qqvhyq_0\\": [_exp2(), \\"px\\"] + } +}); + +const _exp3 = /*#__PURE__*/() => \\"h1\\"; + +const _exp4 = /*#__PURE__*/() => props => props.size; + +export const Body = /*#__PURE__*/atomicStyled(_exp3())({ + name: \\"Body\\", + class: \\"atm_c8_1cjuufw Body_b1vhermz\\", + vars: { + \\"Body_b1vhermz_AtomicStyledProcessor_1qqvhyq_0\\": [_exp4(), \\"px\\"] + }, + atomic: true +});" +`; + +exports[`strategy shaker uses string passed in variableNameSlug 2`] = ` + +CSS: + +.Title_t13jq05 { + font-size: var(--Title_t13jq05_StyledProcessor_1qqvhyq_0); +} +.atm_c8_1cjuufw.atm_c8_1cjuufw{font-size:var(--Body_b1vhermz_AtomicStyledProcessor_1qqvhyq_0);} + +Dependencies: NA + +`; + exports[`strategy shaker uses the same custom property for the same expression 1`] = ` "import { styled } from '@linaria/react'; diff --git a/packages/testkit/src/babel.test.ts b/packages/testkit/src/babel.test.ts index 3d60b2fdb..bf536491a 100644 --- a/packages/testkit/src/babel.test.ts +++ b/packages/testkit/src/babel.test.ts @@ -159,7 +159,7 @@ describe('strategy shaker', () => { expect(metadata).toMatchSnapshot(); }); - it('uses string passed in as classNameSlug', async () => { + it('uses string passed in classNameSlug', async () => { const { code, metadata } = await transform( dedent` import { styled } from '@linaria/react'; @@ -182,6 +182,40 @@ describe('strategy shaker', () => { expect(metadata).toMatchSnapshot(); }); + it('uses string passed in variableNameSlug', async () => { + const { code, metadata } = await transform( + dedent` + import { styled as atomicStyled } from '@linaria/atomic'; + import { styled } from '@linaria/react'; + + export const Title = styled('h1')\` + font-size: ${'${props => props.size}px'}; + \`; + + export const Body = atomicStyled('h1')\` + font-size: ${'${props => props.size}px'}; + \`; +`, + [ + evaluator, + { + variableNameSlug: [ + 'componentName', + 'componentSlug', + 'processor', + 'valueSlug', + 'index', + ] + .map((s) => `[${s}]`) + .join('_'), + }, + ] + ); + + expect(code).toMatchSnapshot(); + expect(metadata).toMatchSnapshot(); + }); + it('removes fake replacement patterns in string classNameSlug', async () => { const { code, metadata } = await transform( dedent` @@ -203,7 +237,7 @@ describe('strategy shaker', () => { expect(metadata).toMatchSnapshot(); }); - it('handles fn passed in as classNameSlug', async () => { + it('handles fn passed in classNameSlug', async () => { const { code, metadata } = await transform( dedent` import { styled } from '@linaria/react'; @@ -234,6 +268,35 @@ describe('strategy shaker', () => { expect(metadata).toMatchSnapshot(); }); + it('handles fn passed in variableNameSlug', async () => { + const { code, metadata } = await transform( + dedent` + import { styled as atomicStyled } from '@linaria/atomic'; + import { styled } from '@linaria/react'; + + export const Title = styled('h1')\` + font-size: ${'${props => props.size}px'}; + \`; + + export const Body = atomicStyled('h1')\` + font-size: ${'${props => props.size}px'}; + \`; +`, + [ + evaluator, + { + variableNameSlug: (context) => + `${context.valueSlug}__${context.componentName}__${ + context.precedingCss.match(/([\w-]+)\s*:\s*$/)?.[1] ?? 'unknown' + }`, + }, + ] + ); + + expect(code).toMatchSnapshot(); + expect(metadata).toMatchSnapshot(); + }); + it('transpiles styled template literal with function and tag', async () => { const { code, metadata } = await transform( dedent` diff --git a/packages/utils/src/IVariableContext.ts b/packages/utils/src/IVariableContext.ts new file mode 100644 index 000000000..9438c5312 --- /dev/null +++ b/packages/utils/src/IVariableContext.ts @@ -0,0 +1,10 @@ +export interface IVariableContext { + componentName: string; + componentSlug: string; + precedingCss: string; + index: number; + processor: string; + source: string; + unit: string; + valueSlug: string; +} diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 57e38b1a0..e30290379 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -1,3 +1,4 @@ +export type { IVariableContext } from './IVariableContext'; export { default as asyncResolveFallback, syncResolve, diff --git a/packages/utils/src/options/types.ts b/packages/utils/src/options/types.ts index 720f93d33..8ad0089c2 100644 --- a/packages/utils/src/options/types.ts +++ b/packages/utils/src/options/types.ts @@ -1,5 +1,6 @@ import type { TransformOptions } from '@babel/core'; +import type { IVariableContext } from '../IVariableContext'; import type { Core } from '../babel'; export type ClassNameSlugVars = { @@ -17,6 +18,8 @@ export type ClassNameFn = ( args: ClassNameSlugVars ) => string; +export type VariableNameFn = (context: IVariableContext) => string; + export type Evaluator = ( filename: string, options: StrictOptions, @@ -38,6 +41,7 @@ export type StrictOptions = { evaluate: boolean; extensions: string[]; ignore?: RegExp; - tagResolver?: (source: string, tag: string) => string | null; rules: EvalRule[]; + tagResolver?: (source: string, tag: string) => string | null; + variableNameSlug?: string | VariableNameFn; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d3be992cc..1f6d00bc5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -416,6 +416,7 @@ importers: '@emotion/is-prop-valid': ^0.8.8 '@linaria/core': workspace:^ '@linaria/tags': workspace:^ + '@linaria/utils': workspace:^ '@types/babel__core': ^7.1.19 '@types/node': ^17.0.39 '@types/react': '>=16' @@ -426,6 +427,7 @@ importers: '@emotion/is-prop-valid': 0.8.8 '@linaria/core': link:../core '@linaria/tags': link:../tags + '@linaria/utils': link:../utils ts-invariant: 0.10.3 devDependencies: '@babel/types': 7.18.9 @@ -2771,22 +2773,22 @@ packages: postcss-selector-parser: 6.0.10 dev: false - /@definitelytyped/header-parser/0.0.132: - resolution: {integrity: sha512-xjj2ahDRAf9pB77xFSfrCzSIIjksAieDVfc6KcrfLXHzcA3FJ5tyXWCljWmTYBR1bnknrp8XVvosC7IiUN66jg==} + /@definitelytyped/header-parser/0.0.133: + resolution: {integrity: sha512-Mv1F76WeuzdO9qrVi9hRQHjbwmb9bU5Gw5jdmUVWHma68IeiMNYlcMeKwQua7yVM+zRvihWvEI9s4O5NxY/gAA==} dependencies: - '@definitelytyped/typescript-versions': 0.0.132 + '@definitelytyped/typescript-versions': 0.0.133 '@types/parsimmon': 1.10.6 parsimmon: 1.18.1 dev: true - /@definitelytyped/typescript-versions/0.0.132: - resolution: {integrity: sha512-jHe+l/djS7RGQ+YWKPGuzfh4WXKPeRmBJ+4QHXpB4moahEyK86nMaTmdqYZliO8rD4HUEK20/4V/g+uUrG1GxQ==} + /@definitelytyped/typescript-versions/0.0.133: + resolution: {integrity: sha512-tfitkEgTmOBXDfgzzlxoXSYsUqIimKV2rdLd+61Mfzcp34yZ3bdhS8+4Gnc6rdMR4+V/sa3yvy5lYZLK2HP11Q==} dev: true - /@definitelytyped/utils/0.0.132: - resolution: {integrity: sha512-freIvPdHEjuFqa+W/7T6m2XzxZRYe5LYiBa2tmWGQ7qwZhbBnDyZN8y0k7fe/YP+LRU5ahho7BBVrPeD4t+U7w==} + /@definitelytyped/utils/0.0.133: + resolution: {integrity: sha512-aRCduwfl3l+3FJDGGDA5HDVF5FwKLYVEFQ5xKEi8Yz4RZqpAXRN7xKAuQiGx1yQ57CkMRaaOgLrcGoYECSBWcA==} dependencies: - '@definitelytyped/typescript-versions': 0.0.132 + '@definitelytyped/typescript-versions': 0.0.133 '@qiwi/npm-registry-client': 8.9.1 '@types/node': 14.18.20 charm: 1.0.2 @@ -5611,7 +5613,7 @@ packages: peerDependencies: typescript: '*' dependencies: - '@definitelytyped/header-parser': 0.0.132 + '@definitelytyped/header-parser': 0.0.133 command-exists: 1.2.9 rimraf: 3.0.2 semver: 6.3.0 @@ -5627,9 +5629,9 @@ packages: peerDependencies: typescript: '>= 3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev || >= 3.8.0-dev || >= 3.9.0-dev || >= 4.0.0-dev' dependencies: - '@definitelytyped/header-parser': 0.0.132 - '@definitelytyped/typescript-versions': 0.0.132 - '@definitelytyped/utils': 0.0.132 + '@definitelytyped/header-parser': 0.0.133 + '@definitelytyped/typescript-versions': 0.0.133 + '@definitelytyped/utils': 0.0.133 dts-critic: 3.3.11_typescript@4.7.4 fs-extra: 6.0.1 json-stable-stringify: 1.0.1