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

Utils ip dependency fix #3803

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"devDependencies": {
"@terascope/types": "^1.2.0",
"bunyan": "^1.8.15",
"elasticsearch-store": "^1.3.1",
"elasticsearch-store": "^1.3.2",
"fs-extra": "^11.2.0",
"ms": "^2.1.3",
"nanoid": "^5.0.7",
Expand Down
9 changes: 4 additions & 5 deletions packages/data-mate/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@terascope/data-mate",
"displayName": "Data-Mate",
"version": "1.3.1",
"version": "1.3.2",
"description": "Library of data validations/transformations",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/data-mate#readme",
"repository": {
Expand Down Expand Up @@ -30,24 +30,23 @@
"test:watch": "ts-scripts test --watch . --"
},
"dependencies": {
"@terascope/data-types": "^1.3.1",
"@terascope/data-types": "^1.3.2",
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"@types/validator": "^13.12.2",
"awesome-phonenumber": "^7.2.0",
"date-fns": "^4.1.0",
"ip-bigint": "^8.2.0",
"ip6addr": "^0.2.5",
"ipaddr.js": "^2.2.0",
"is-cidr": "^5.1.0",
"is-ip": "^5.0.1",
"jexl": "^2.2.2",
"lodash": "^4.17.21",
"mnemonist": "^0.39.8",
"uuid": "^10.0.0",
"valid-url": "^1.0.9",
"validator": "^13.12.0",
"xlucene-parser": "^1.3.1"
"xlucene-parser": "^1.3.2"
},
"devDependencies": {
"@types/ip6addr": "^0.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/data-mate/src/ip-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import isCidr from 'is-cidr';
import ip6addr from 'ip6addr';
import { isIP, isIPv6 } from 'is-ip';
import { isIP, isIPv6 } from '@terascope/utils';
import { isInfiniteMin, isInfiniteMax, ParsedRange } from 'xlucene-parser';
import { getTypeOf, isString, isNonZeroCidr } from '@terascope/utils';
import { MatchValueFn } from './interfaces.js';
Expand Down
9 changes: 4 additions & 5 deletions packages/data-mate/src/validations/field-validator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as ts from '@terascope/utils';
import ipaddr from 'ipaddr.js';
import { isIP as _isIP, isIPv6 } from 'is-ip';
import ip6addr from 'ip6addr';
import { parsePhoneNumber } from 'awesome-phonenumber';
import validator from 'validator';
Expand Down Expand Up @@ -444,7 +443,7 @@ export function isIP(input: unknown, _parentContext?: unknown): input is string

function isValidIP(input: unknown, _parentContext?: unknown) {
if (!ts.isString(input)) return false;
if (!_isIP(input)) return false;
if (!ts.isIP(input)) return false;

return true;
}
Expand Down Expand Up @@ -645,11 +644,11 @@ function _inIPRange(input: unknown, args: { min?: string; max?: string; cidr?: s

// assign upper/lower bound even if min or max is missing
let { min, max } = args;
if (!min) min = isIPv6(input) ? MIN_IPV6_IP : MIN_IPV4_IP;
if (!max) max = isIPv6(input) ? MAX_IPV6_IP : MAX_IPV4_IP;
if (!min) min = ts.isIPv6(input) ? MIN_IPV6_IP : MIN_IPV4_IP;
if (!max) max = ts.isIPv6(input) ? MAX_IPV6_IP : MAX_IPV4_IP;

// min and max must be valid ips, same IP type, and min < max
if (!isIP(min) || !isIP(max) || isIPv6(min) !== isIPv6(max)
if (!isIP(min) || !isIP(max) || ts.isIPv6(min) !== ts.isIPv6(max)
|| ip6addr.compare(max, min) === -1) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/data-mate/src/vector/types/IPVector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parseIp } from 'ip-bigint';
import { isIP } from 'is-ip';
import { isIP } from '@terascope/utils';
import { Vector, VectorOptions } from '../Vector.js';
import { VectorType, DataBuckets } from '../interfaces.js';

Expand Down
4 changes: 2 additions & 2 deletions packages/data-types/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@terascope/data-types",
"displayName": "Data Types",
"version": "1.3.1",
"version": "1.3.2",
"description": "A library for defining the data structures and mapping",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/data-types#readme",
"bugs": {
Expand All @@ -28,7 +28,7 @@
},
"dependencies": {
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"graphql": "^16.9.0",
"lodash": "^4.17.21",
"yargs": "^17.7.2"
Expand Down
6 changes: 3 additions & 3 deletions packages/elasticsearch-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@terascope/elasticsearch-api",
"displayName": "Elasticsearch API",
"version": "4.3.1",
"version": "4.3.2",
"description": "Elasticsearch client api used across multiple services, handles retries and exponential backoff",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/elasticsearch-api#readme",
"bugs": {
Expand All @@ -25,15 +25,15 @@
},
"dependencies": {
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"bluebird": "^3.7.2",
"setimmediate": "^1.0.5"
},
"devDependencies": {
"@opensearch-project/opensearch": "^1.2.0",
"@types/elasticsearch": "^5.0.43",
"elasticsearch": "^15.4.1",
"elasticsearch-store": "^1.3.1",
"elasticsearch-store": "^1.3.2",
"elasticsearch6": "npm:@elastic/elasticsearch@^6.7.0",
"elasticsearch7": "npm:@elastic/elasticsearch@^7.0.0",
"elasticsearch8": "npm:@elastic/elasticsearch@^8.0.0"
Expand Down
10 changes: 5 additions & 5 deletions packages/elasticsearch-store/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "elasticsearch-store",
"displayName": "Elasticsearch Store",
"version": "1.3.1",
"version": "1.3.2",
"description": "An API for managing an elasticsearch index, with versioning and migration support.",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/elasticsearch-store#readme",
"bugs": {
Expand Down Expand Up @@ -30,10 +30,10 @@
"test:watch": "ts-scripts test --watch . --"
},
"dependencies": {
"@terascope/data-mate": "^1.3.1",
"@terascope/data-types": "^1.3.1",
"@terascope/data-mate": "^1.3.2",
"@terascope/data-types": "^1.3.2",
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"elasticsearch6": "npm:@elastic/elasticsearch@^6.7.0",
Expand All @@ -43,7 +43,7 @@
"opensearch2": "npm:@opensearch-project/opensearch@^2.2.1",
"setimmediate": "^1.0.5",
"uuid": "^10.0.0",
"xlucene-translator": "^1.3.1"
"xlucene-translator": "^1.3.2"
},
"devDependencies": {
"@types/uuid": "^10.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/job-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@terascope/job-components",
"displayName": "Job Components",
"version": "1.5.2",
"version": "1.5.3",
"description": "A teraslice library for validating jobs schemas, registering apis, and defining and running new Job APIs",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/job-components#readme",
"bugs": {
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"convict": "^6.2.4",
"convict-format-with-moment": "^6.2.0",
"convict-format-with-validator": "^6.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@terascope/scripts",
"displayName": "Scripts",
"version": "1.4.1",
"version": "1.4.2",
"description": "A collection of terascope monorepo scripts",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/scripts#readme",
"bugs": {
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@kubernetes/client-node": "^0.22.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"codecov": "^3.8.3",
"execa": "9.4.0",
"fs-extra": "^11.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/terafoundation/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "terafoundation",
"displayName": "Terafoundation",
"version": "1.5.2",
"version": "1.5.3",
"description": "A Clustering and Foundation tool for Terascope Tools",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/terafoundation#readme",
"bugs": {
Expand Down Expand Up @@ -30,14 +30,14 @@
"dependencies": {
"@terascope/file-asset-apis": "^1.0.2",
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"bluebird": "^3.7.2",
"bunyan": "^1.8.15",
"convict": "^6.2.4",
"convict-format-with-moment": "^6.2.0",
"convict-format-with-validator": "^6.2.0",
"elasticsearch": "^15.4.1",
"elasticsearch-store": "^1.3.1",
"elasticsearch-store": "^1.3.2",
"express": "^4.21.0",
"js-yaml": "^4.1.0",
"nanoid": "^5.0.7",
Expand Down
6 changes: 3 additions & 3 deletions packages/teraslice-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "teraslice-cli",
"displayName": "Teraslice CLI",
"version": "2.7.1",
"version": "2.7.2",
"description": "Command line manager for teraslice jobs, assets, and cluster references.",
"keywords": [
"teraslice"
Expand Down Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"@terascope/fetch-github-release": "^1.0.0",
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"chalk": "^5.3.0",
"cli-table3": "^0.6.4",
"diff": "^7.0.0",
Expand All @@ -54,7 +54,7 @@
"pretty-bytes": "^6.1.1",
"prompts": "^2.4.2",
"signale": "^1.4.0",
"teraslice-client-js": "^1.3.1",
"teraslice-client-js": "^1.3.2",
"tmp": "^0.2.0",
"tty-table": "^4.2.3",
"yargs": "^17.7.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/teraslice-client-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "teraslice-client-js",
"displayName": "Teraslice Client (JavaScript)",
"version": "1.3.1",
"version": "1.3.2",
"description": "A Node.js client for teraslice jobs, assets, and cluster references.",
"keywords": [
"elasticsearch",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"auto-bind": "^5.0.1",
"got": "^13.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/teraslice-messaging/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@terascope/teraslice-messaging",
"displayName": "Teraslice Messaging",
"version": "1.6.1",
"version": "1.6.2",
"description": "An internal teraslice messaging library using socket.io",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/teraslice-messaging#readme",
"bugs": {
Expand Down Expand Up @@ -36,7 +36,7 @@
},
"dependencies": {
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"ms": "^2.1.3",
"nanoid": "^5.0.7",
"p-event": "^6.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/teraslice-state-storage/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@terascope/teraslice-state-storage",
"displayName": "Teraslice State Storage",
"version": "1.3.1",
"version": "1.3.2",
"description": "State storage operation api for teraslice",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/teraslice-state-storage#readme",
"bugs": {
Expand All @@ -24,8 +24,8 @@
"test:watch": "ts-scripts test --watch . --"
},
"dependencies": {
"@terascope/elasticsearch-api": "^4.3.1",
"@terascope/utils": "^1.3.1"
"@terascope/elasticsearch-api": "^4.3.2",
"@terascope/utils": "^1.3.2"
},
"engines": {
"node": ">=18.18.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/teraslice-test-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"fs-extra": "^11.2.0"
},
"devDependencies": {
"@terascope/job-components": "^1.5.2"
"@terascope/job-components": "^1.5.3"
},
"peerDependencies": {
"@terascope/job-components": ">=1.5.2"
"@terascope/job-components": ">=1.5.3"
},
"engines": {
"node": ">=18.18.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/teraslice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
},
"dependencies": {
"@kubernetes/client-node": "^0.22.0",
"@terascope/elasticsearch-api": "^4.3.1",
"@terascope/job-components": "^1.5.2",
"@terascope/teraslice-messaging": "^1.6.1",
"@terascope/elasticsearch-api": "^4.3.2",
"@terascope/job-components": "^1.5.3",
"@terascope/teraslice-messaging": "^1.6.2",
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"async-mutex": "^0.5.0",
"barbe": "^3.0.16",
"body-parser": "^1.20.2",
Expand All @@ -63,7 +63,7 @@
"semver": "^7.6.3",
"socket.io": "^1.7.4",
"socket.io-client": "^1.7.4",
"terafoundation": "^1.5.2",
"terafoundation": "^1.5.3",
"uuid": "^10.0.0"
},
"devDependencies": {
Expand Down
7 changes: 3 additions & 4 deletions packages/ts-transforms/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ts-transforms",
"displayName": "TS Transforms",
"version": "1.3.1",
"version": "1.3.2",
"description": "An ETL framework built upon xlucene-evaluator",
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/ts-transforms#readme",
"bugs": {
Expand Down Expand Up @@ -36,12 +36,11 @@
"test:watch": "ts-scripts test --watch . --"
},
"dependencies": {
"@terascope/data-mate": "^1.3.1",
"@terascope/data-mate": "^1.3.2",
"@terascope/types": "^1.2.0",
"@terascope/utils": "^1.3.1",
"@terascope/utils": "^1.3.2",
"awesome-phonenumber": "^7.2.0",
"graphlib": "^2.1.8",
"is-ip": "^5.0.1",
"jexl": "^2.2.2",
"nanoid": "^5.0.7",
"valid-url": "^1.0.9",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isIP } from 'is-ip';
import { isIP } from '@terascope/utils';
import ValidationOpBase from './base.js';
import { PostProcessConfig } from '../../../interfaces.js';

Expand Down
Loading
Loading