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

_realname=basedpyright
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.31.7
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=('d16adf977c4fd3f4cf7617f8f8d0ed9cd3626a2d5766088e348f8911487dd17a')
noextract=("${_realname}-${pkgver}.tgz")

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