Skip to content

Commit

Permalink
Use wild-wild-path
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 27, 2022
1 parent e4e6b0f commit e4b9961
Show file tree
Hide file tree
Showing 34 changed files with 36 additions and 887 deletions.
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"update-notifier": "^5.0.1",
"uuid": "^8.3.2",
"wild-wild-parser": "^1.0.0",
"wild-wild-path": "^1.0.0",
"wrap-ansi": "^8.0.1",
"write-file-atomic": "^4.0.1",
"yargs": "^17.3.1"
Expand Down
2 changes: 1 addition & 1 deletion src/config/cwd.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import filterObj from 'filter-obj'
import { get } from 'wild-wild-path'

import { isRecurseObject } from './merge.js'
import { get } from './normalize/lib/wild_wild_path/main.js'
import { map } from './normalize/lib/wild_wild_utils/main.js'

// When resolving configuration relative file paths:
Expand Down
2 changes: 1 addition & 1 deletion src/config/load/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import { dirname } from 'path'

import { serializePath } from 'wild-wild-parser'
import { get, set, list } from 'wild-wild-path'

import { UserError } from '../../error/main.js'
import { addBases, getBasePath } from '../cwd.js'
import { deepMerge } from '../merge.js'
import { get, set, list } from '../normalize/lib/wild_wild_path/main.js'

import { loadConfigContents } from './contents.js'
import { normalizeConfigProp } from './normalize.js'
Expand Down
2 changes: 1 addition & 1 deletion src/config/normalize/lib/entry.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { isSamePath } from 'wild-wild-parser'
import { set, remove } from 'wild-wild-path'

import { applyRule } from './apply.js'
import { addMoves } from './move.js'
import { getOpts } from './opts.js'
import { addWarnings } from './warn.js'
import { set, remove } from './wild_wild_path/main.js'

// Apply rule for a specific entry
export const applyEntryRule = async function (
Expand Down
2 changes: 1 addition & 1 deletion src/config/normalize/lib/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import pReduce from 'p-reduce'
import { list } from 'wild-wild-path'

import { cleanObject } from '../../../utils/clean.js'

import { applyEntryRule } from './entry.js'
import { normalizeRules } from './rule.js'
import { logWarnings } from './warn.js'
import { list } from './wild_wild_path/main.js'

// Normalize configuration shape and do custom validation.
// An array of rule objects is passed.
Expand Down
2 changes: 1 addition & 1 deletion src/config/normalize/lib/modify.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { normalizePath } from 'wild-wild-parser'
import { has } from 'wild-wild-path'

import { callValueFunc, callUserFunc, getValidateExampleError } from './call.js'
import { resolvePath } from './path.js'
import { transformValue } from './transform.js'
import { getWarnings } from './warn.js'
import { has } from './wild_wild_path/main.js'

// Once the initial value has been computed, apply validation and transforms,
// unless the value is `undefined`.
Expand Down
3 changes: 1 addition & 2 deletions src/config/normalize/lib/rule.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { normalizeQuery, serializeQuery } from 'wild-wild-parser'

import { get } from './wild_wild_path/main.js'
import { get } from 'wild-wild-path'

// Validate and normalize rules.
// All methods and properties that use queries can use either the string or the
Expand Down
66 changes: 0 additions & 66 deletions src/config/normalize/lib/wild_wild_path/get.js

This file was deleted.

71 changes: 0 additions & 71 deletions src/config/normalize/lib/wild_wild_path/iterate/children.js

This file was deleted.

26 changes: 0 additions & 26 deletions src/config/normalize/lib/wild_wild_path/iterate/duplicate.js

This file was deleted.

52 changes: 0 additions & 52 deletions src/config/normalize/lib/wild_wild_path/iterate/expand.js

This file was deleted.

21 changes: 0 additions & 21 deletions src/config/normalize/lib/wild_wild_path/iterate/group.js

This file was deleted.

Loading

0 comments on commit e4b9961

Please sign in to comment.