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

@waiting/shared-types-dev

Package Overview
Dependencies
Maintainers
0
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waiting/shared-types-dev - npm Package Compare versions

Comparing version 18.0.5 to 19.0.0

6

package.json
{
"name": "@waiting/shared-types-dev",
"author": "waiting",
"version": "18.0.5",
"version": "19.0.0",
"description": "shared typescript types develop",

@@ -36,3 +36,3 @@ "private": false,

"@waiting/shared-core": "^23.22.0",
"ts-morph": "^23.0.0"
"ts-morph": "^24.0.0"
},

@@ -76,3 +76,3 @@ "engines": {

},
"gitHead": "422b9ebbab51772a0559380f0b5c86f72cbb696b"
"gitHead": "231ce139cc382dff913d6227ba9ec45c3225393d"
}

@@ -161,4 +161,4 @@ import assert from 'node:assert'

// }
const typeText = typeReferenceText
// const typeText = type.getText()
const typeText = patchJsExtForImportModulePath(typeReferenceText)
const aliasName = 'T' + Math.random().toString().slice(-5)

@@ -182,2 +182,20 @@

/**
* From 'import("F:/.../test/literal/types").DbDict<import("F:/.../test/literal/types").Db>' to
* 'import("F:/.../test/literal/types.js").DbDict<import("F:/.../test/literal/types.js").Db>'
*/
function patchJsExtForImportModulePath(path: string): string {
const ret = path.replaceAll(/import\("([^")]+?)"\)/gu, (substring: string) => {
if (substring.endsWith('.js")')) {
return substring
}
if (substring.endsWith('.ts")')) {
return substring.replace('.ts"', '.js"')
}
return substring.replace('")', '.js")')
})
return ret
}
export function genTypeAliasDeclarationFaster(

@@ -184,0 +202,0 @@ checker: TypeChecker,

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