# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>

_realname=basedpyright
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.36.2
pkgrel=1
pkgdesc='Pyright fork with various improvements and Pylance features (mingw-w64)'
arch=('any')
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
url='https://github.com/DetachHead/basedpyright'
msys2_documentation_url='https://docs.basedpyright.com'
msys2_references=(
  'archlinux: basedpyright'
  'purl: pkg:npm/basedpyright'
)
license=('spdx:MIT')
provides=("${MINGW_PACKAGE_PREFIX}-pyright")
conflicts=("${MINGW_PACKAGE_PREFIX}-pyright")
depends=("${MINGW_PACKAGE_PREFIX}-nodejs")
source=("https://registry.npmjs.org/${_realname}/-/${_realname}-${pkgver}.tgz")
sha256sums=('a2ffeedb3998768c9879e532a251f3ca2b526df078097d6263097b118d8b8df7')
noextract=("${_realname}-${pkgver}.tgz")

package() {
  npm install -g \
    --cache npm-cache \
    --prefix "${pkgdir}${MINGW_PREFIX}" \
    "${_realname}-${pkgver}.tgz"
}
