Skip to content

Commit

Permalink
refactor: adjust path
Browse files Browse the repository at this point in the history
  • Loading branch information
lukascivil committed Jul 28, 2023
1 parent a92249f commit b699e68
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/core/generate-json-patch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { getDiff } from '.'

// Models
import { JsonPatch } from '../models/jsondiffer.model'
import { JsonPatch } from '../models/json-difference.model'
import { generateJsonPatch } from './generate-json-patch'

describe('GenerateJsonPatch function', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/generate-json-patch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Models
import { Delta, JsonPatch } from '../models/jsondiffer.model'
import { Delta, JsonPatch } from '../models/json-difference.model'

export const generateJsonPatch = (delta: Delta): Array<JsonPatch> => {
const operations: Array<JsonPatch> = []
Expand Down
2 changes: 1 addition & 1 deletion src/core/get-diff.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { getDiff } from '.'

// Models
import { Delta } from '../models/jsondiffer.model'
import { Delta } from '../models/json-difference.model'

describe('GetDiff function', () => {
test('Should return the difference between two basic structures', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/get-diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getPathsDiff } from './get-paths-diff'
import { getStructPaths } from './get-struct-paths'

// Models
import { Delta, JsonDiffOptions } from '../models/jsondiffer.model'
import { Delta, JsonDiffOptions } from '../models/json-difference.model'
import sanitizeDelta from '../helpers/sanitize-delta'

const defaultOptions: JsonDiffOptions = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/get-edited-paths.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getEditedPaths } from '.'
import { EditedPath } from '../models/jsondiffer.model'
import { EditedPath } from '../models/json-difference.model'

describe('GetEditedPaths function', () => {
test('Should return empty when there is no edited value', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/get-edited-paths.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Models
import { EditedPath, StructPaths } from '../models/jsondiffer.model'
import { EditedPath, StructPaths } from '../models/json-difference.model'

/**
* This method returns all paths whose leaf value has changed
Expand Down
2 changes: 1 addition & 1 deletion src/core/get-paths-diff.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Packages
import { getPathsDiff } from '.'
import { PathsDiff } from '../models/jsondiffer.model'
import { PathsDiff } from '../models/json-difference.model'

describe('GetPathsDiff function', () => {
test('Should return empty when there is no key difference', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/get-paths-diff.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Models
import { PathsDiff, StructPaths } from '../models/jsondiffer.model'
import { PathsDiff, StructPaths } from '../models/json-difference.model'

/**
* This method returns all paths whose leaf value has changed
Expand Down
2 changes: 1 addition & 1 deletion src/core/get-struct-paths.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Models
import { StructPaths } from '../models/jsondiffer.model'
import { StructPaths } from '../models/json-difference.model'

const generatePath = (isArray: boolean, currentPath: string, newPath: string, lodashLike: boolean): string => {
const prefix = lodashLike ? (isArray ? '[' : '.') : '/'
Expand Down
2 changes: 1 addition & 1 deletion src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './jsondiffer.model'
export * from './json-difference.model'
File renamed without changes.

0 comments on commit b699e68

Please sign in to comment.