Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

groq-js

Package Overview
Dependencies
Maintainers
35
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

groq-js - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4-beta.0

dist/index.cjs

86

package.json
{
"name": "groq-js",
"version": "1.1.3",
"version": "1.1.4-beta.0",
"license": "MIT",
"author": "Sanity.io <hello@sanity.io>",
"main": "./dist/1.umd.cjs",
"types": "./dist/1.umd.d.ts",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"import": {
"types": "./dist/1.esm.d.ts",
"default": "./dist/1.esm.mjs"
},
"require": {
"types": "./dist/1.umd.d.ts",
"default": "./dist/1.umd.cjs"
},
"default": "./dist/1.umd.cjs"
"types": "./dist/index.d.ts",
"source": "./src/1.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"sideEffects": false,
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"source": "./src/1.ts",
"types": "./dist/index.d.ts",
"files": [

@@ -28,39 +27,44 @@ "dist",

],
"engines": {
"node": ">= 14"
},
"scripts": {
"prebuild": "npx rimraf dist",
"build": "pkg build --strict",
"prepublishOnly": "npm run build",
"build": "rimraf dist; rollup -c",
"test:generate": "./test/generate.sh",
"prettify": "prettier --write src/**/*.ts src/*.ts",
"prettify-check": "prettier --check src/**/*.ts src/*.ts",
"test": "tap --no-timeout test/*.test.*",
"prettify": "prettier --write src/**/*.ts src/*.ts",
"prettify-check": "prettier --check src/**/*.ts src/*.ts"
"test:generate": "./test/generate.sh"
},
"browserslist": [
"> 0.2% and supports es6-module and supports es6-module-dynamic-import and not dead and not IE 11",
"maintained node versions"
],
"tap": {
"check-coverage": false,
"node-arg": [
"-r",
"esbuild-register"
]
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.3.3",
"@types/tap": "^15.0.5",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"esbuild": "^0.14.2",
"esbuild-register": "^3.2.0",
"eslint-config-sanity": "^5.1.0",
"@sanity/pkg-utils": "^2.0.3",
"@types/tap": "^15.0.7",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"esbuild-register": "^3.4.2",
"eslint-config-prettier": "^8.5.0",
"eslint-config-sanity": "^6.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"ndjson": "^2.0.0",
"np": "^7.6.2",
"prettier": "^2.2.1",
"np": "^7.6.3",
"prettier": "^2.8.1",
"prettier-plugin-packagejson": "^2.3.0",
"rimraf": "^3.0.2",
"rollup": "^2.75.7",
"rollup-plugin-dts": "^4.2.2",
"semver": "^7.3.5",
"tap": "^15.0.6",
"tslib": "^2.2.0",
"typescript": "^4.2.4"
"semver": "^7.3.8",
"tap": "^16.3.2",
"typescript": "^4.9.4"
},
"tap": {
"node-arg": [
"-r",
"esbuild-register"
],
"check-coverage": false
"engines": {
"node": ">= 14"
}
}

@@ -1,2 +0,2 @@

export {parse} from './parser'
export {evaluate} from './evaluator'
export * from './evaluator'
export * from './parser'
import {ExprNode} from '../nodeTypes'
import {NULL_VALUE, Value} from '../values'
import {evaluate} from './evaluate'
import {Scope} from './scope'
import {NULL_VALUE, Value} from '../values'

@@ -6,0 +6,0 @@ function canConstantEvaluate(node: ExprNode): boolean {

import * as NodeTypes from '../nodeTypes'
import {operators} from './operators'
import {Scope} from './scope'
import {EvaluateOptions, Executor} from './types'
import {
DateTime,
FALSE_VALUE,
fromDateTime,
fromJS,

@@ -16,3 +11,6 @@ fromNumber,

} from '../values'
import {operators} from './operators'
import {partialCompare} from './ordering'
import {Scope} from './scope'
import {EvaluateOptions, Executor} from './types'

@@ -483,1 +481,22 @@ export function evaluate(

}
export type {EvaluateOptions, NodeTypes, Value}
export type {
AnyStaticValue,
ArrayValue,
BooleanValue,
DateTime,
DateTimeValue,
GroqType,
NullValue,
NumberValue,
ObjectValue,
Path,
PathValue,
StaticValue,
StreamValue,
StringValue,
} from '../values'
export type {GroqFunction, GroqFunctionArg,GroqPipeFunction} from './functions'
export type {Scope} from './scope'
export type {Context,Executor} from './types'
import type {ExprNode} from '../nodeTypes'
import {totalCompare} from './ordering'
import {Scope} from './scope'
import {evaluateScore} from './scoring'
import {Executor} from './types'
import {
DateTime,
FALSE_VALUE,
fromJS,
fromNumber,
fromPath,
fromString,
getType,
fromNumber,
TRUE_VALUE,
FALSE_VALUE,
NULL_VALUE,
Value,
DateTime,
fromString,
fromPath,
Path,
fromJS,
StreamValue,
TRUE_VALUE,
Value,
} from '../values'
import {totalCompare} from './ordering'
import {portableTextContent} from './pt'
import {Scope} from './scope'
import {evaluateScore} from './scoring'
import {Executor} from './types'

@@ -61,3 +61,3 @@ function hasReference(value: any, pathSet: Set<string>): boolean {

type GroqFunctionArg = ExprNode
export type GroqFunctionArg = ExprNode
type WithOptions<T> = T & {

@@ -82,2 +82,3 @@ arity?: GroqFunctionArity

// eslint-disable-next-line require-await
global.anywhere = async function anywhere() {

@@ -523,2 +524,3 @@ throw new Error('not implemented')

const delta: FunctionSet = {}
// eslint-disable-next-line require-await
delta.operation = async function (args, scope) {

@@ -573,3 +575,3 @@ const hasBefore = scope.context.before !== null

let n: number | undefined = undefined
let n: number | undefined
for await (const elem of arr) {

@@ -594,3 +596,3 @@ if (elem.type === 'null') continue

let n: number | undefined = undefined
let n: number | undefined
for await (const elem of arr) {

@@ -597,0 +599,0 @@ if (elem.type === 'null') continue

@@ -0,2 +1,27 @@

export {tryConstantEvaluate} from './constantEvaluate'
export type {
AnyStaticValue,
ArrayValue,
BooleanValue,
Context,
DateTime,
DateTimeValue,
EvaluateOptions,
Executor,
GroqFunction,
GroqFunctionArg,
GroqPipeFunction,
GroqType,
NodeTypes,
NullValue,
NumberValue,
ObjectValue,
Path,
PathValue,
Scope,
StaticValue,
StreamValue,
StringValue,
Value,
} from './evaluate'
export {evaluateQuery as evaluate} from './evaluate'
export {tryConstantEvaluate} from './constantEvaluate'
import {OpCall} from '../nodeTypes'
import {
TRUE_VALUE,
FALSE_VALUE,
NULL_VALUE,
fromDateTime,
fromJS,
fromNumber,
Value,
fromString,
fromJS,
fromDateTime,
NULL_VALUE,
StreamValue,
TRUE_VALUE,
Value,
} from '../values'
import {isEqual} from './equality'
import {gatherText, matchAnalyzePattern,matchText, matchTokenize, Pattern, Token} from './matching'
import {partialCompare} from './ordering'
import {gatherText, Token, Pattern, matchText, matchTokenize, matchAnalyzePattern} from './matching'

@@ -17,0 +17,0 @@ type GroqOperatorFn = (left: Value, right: Value) => Value | PromiseLike<Value>

@@ -1,2 +0,2 @@

import {NULL_VALUE, Value} from '../values'
import {Value} from '../values'

@@ -3,0 +3,0 @@ export async function portableTextContent(value: Value): Promise<string | null> {

@@ -1,5 +0,5 @@

import {Executor} from './types'
import {ExprNode} from '../nodeTypes'
import {gatherText, matchPatternRegex, matchTokenize, Token} from './matching'
import {Scope} from './scope'
import {Executor} from './types'

@@ -6,0 +6,0 @@ // BM25 similarity constants

import * as NodeTypes from '../nodeTypes'
import {Value} from '../values'
import {Scope} from './scope'
import {Value} from '../values'

@@ -5,0 +5,0 @@ export type Executor<N = NodeTypes.ExprNode> = (node: N, scope: Scope) => Value | PromiseLike<Value>

/* eslint-disable camelcase */
import {tryConstantEvaluate} from './evaluator'
import {GroqFunctionArity, namespaces, pipeFunctions} from './evaluator/functions'
import {Mark, MarkProcessor, MarkVisitor} from './markProcessor'
import * as NodeTypes from './nodeTypes'
import {Mark, MarkProcessor, MarkVisitor} from './markProcessor'
import {GroqFunctionArity, namespaces, pipeFunctions} from './evaluator/functions'
import {parse as rawParse} from './rawParser'

@@ -13,3 +14,2 @@ import {

} from './traversal'
import {tryConstantEvaluate} from './evaluator'
import {ParseOptions} from './types'

@@ -882,1 +882,3 @@

}
export type {ParseOptions}

@@ -0,4 +1,4 @@

export * from './Path'
export * from './StreamValue'
export * from './types'
export * from './utils'
export * from './types'
export * from './StreamValue'
export * from './Path'
import type {Path} from './Path'
import type {StaticValue, DateTime} from './utils'
import type {StreamValue} from './StreamValue'
import type {DateTime,StaticValue} from './utils'

@@ -5,0 +5,0 @@ /**

@@ -1,2 +0,2 @@

import {parseRFC3339, formatRFC3339} from './dateHelpers'
import {formatRFC3339,parseRFC3339} from './dateHelpers'
import {Path} from './Path'

@@ -3,0 +3,0 @@ import {StreamValue} from './StreamValue'

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc