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

groq-js

Package Overview
Dependencies
Maintainers
55
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.11.1 to 1.12.0

2

package.json
{
"name": "groq-js",
"version": "1.11.1",
"version": "1.12.0",
"keywords": [

@@ -5,0 +5,0 @@ "sanity",

@@ -5,3 +5,3 @@ /* eslint-disable max-statements */

import {walk} from './typeEvaluate'
import {mapConcrete} from './typeHelpers'
import {mapConcrete, nullUnion} from './typeHelpers'
import type {NullTypeNode, TypeNode} from './types'

@@ -152,2 +152,30 @@

case 'global.dateTime': {
const arg = walk({node: node.args[0], scope})
return mapConcrete(arg, scope, (arg) => {
if (arg.type === 'string') {
return nullUnion({type: 'string'}) // we don't know wether the string is a valid date or not, so we return a [null, string]-union
}
return {type: 'null'} satisfies NullTypeNode
})
}
case 'global.length': {
const arg = walk({node: node.args[0], scope})
return mapConcrete(arg, scope, (arg) => {
if (arg.type === 'array') {
return {type: 'number'}
}
if (arg.type === 'string') {
return {type: 'number'}
}
return {type: 'null'}
})
}
case 'global.references': {

@@ -154,0 +182,0 @@ return {type: 'boolean'}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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