Skip to content

Commit

Permalink
fix: use with instead of assert as per latest node version (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
akashrpo authored Dec 13, 2024
1 parent 6ef8b8f commit babc2b7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cli/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { sanitizeTrackingPlan } from './trackingplans.js';
import lodash from 'lodash';
import { APIError } from '../types.js';
import { EventType } from 'src/generators/gen.js';
import packageJson from '../../../package.json' assert { type: 'json' };
import packageJson from '../../../package.json' with { type: 'json' };

const { set } = lodash;

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/build.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
import { gen, RawTrackingPlan } from '../../generators/gen.js';
import { RUDDER_AUTOGENERATED_FILE_WARNING } from '../../templates.js';
import { join } from 'path';
import packageJson from '../../../package.json' assert { type: 'json' };
import packageJson from '../../../package.json' with { type: 'json' };
import { StandardProps, DebugContext } from '../index.js';
import {
ErrorContext,
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { createContext, useEffect } from 'react';
import { Box, Text, useApp } from 'ink';
import Link from 'ink-link';
import figures from 'figures';
import packageJson from '../../../package.json' assert { type: 'json' };
import packageJson from '../../../package.json' with { type: 'json' };
import { AnalyticsProps } from '../index.js';

type ErrorContextProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/version.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect, useContext } from 'react';
import { Box, useApp, Text } from 'ink';
import packageJson from '../../../package.json' assert { type: 'json' };
import packageJson from '../../../package.json' with { type: 'json' };
import latest from 'latest-version';
import { StandardProps } from '../index.js';
import { ErrorContext, WrappedError } from './error.js';
Expand Down
2 changes: 1 addition & 1 deletion src/cli/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, { createContext } from 'react';
import { render } from 'ink';
import { Token, Version, Build, Help, Init, ErrorBoundary } from './commands/index.js';
import { Config, getConfig, getTokenMethod } from './config/index.js';
import packageJson from '../../package.json' assert { type: 'json' };
import packageJson from '../../package.json' with { type: 'json' };
import { loadTrackingPlan } from './api/index.js';
import yargs, { ArgumentsCamelCase, Options } from 'yargs';
import { getTrackingPlanName } from './api/trackingplans.js';
Expand Down
2 changes: 1 addition & 1 deletion src/generators/javascript/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async function validateAgainstSchema(
{{#if isBrowser}}
const schemaDraft06 =await import('ajv/lib/refs/json-schema-draft-06.json');
{{else}}
const schemaDraft06 =await import('ajv/lib/refs/json-schema-draft-06.json', { assert: { type: 'json' } });
const schemaDraft06 =await import('ajv/lib/refs/json-schema-draft-06.json', { with: { type: 'json' } });
{{/if}}
ajv.addMetaSchema(schemaDraft06);
}
Expand Down

0 comments on commit babc2b7

Please sign in to comment.