mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-07-15 11:19:51 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
4507bbd651
|
|||
8a89aefe73 | |||
8df969c1db
|
|||
2177e9c088 | |||
a32f42975a | |||
0148979d7d
|
|||
ea357c9080
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# Follow current releases https://nodejs.org/en/about/releases/
|
# Follow current releases https://nodejs.org/en/about/releases/
|
||||||
node-version: [12.x, 14.x, 16.x, 17.x, 18.x]
|
node-version: [14.x, 16.x, 18.x, 19.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
12607
package-lock.json
generated
12607
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tcgdex/sdk",
|
"name": "@tcgdex/sdk",
|
||||||
"version": "2.4.7",
|
"version": "2.4.9",
|
||||||
"main": "./dist/cjs/tcgdex.node.js",
|
"main": "./dist/cjs/tcgdex.node.js",
|
||||||
"module": "./dist/modules/tcgdex.node.js",
|
"module": "./dist/modules/tcgdex.node.js",
|
||||||
"types": "./dist/types/tcgdex.d.ts",
|
"types": "./dist/types/tcgdex.d.ts",
|
||||||
@ -22,28 +22,28 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.14.6",
|
"@babel/core": "^7",
|
||||||
"@babel/preset-env": "^7.14.7",
|
"@babel/preset-env": "^7",
|
||||||
"@babel/preset-typescript": "^7.14.5",
|
"@babel/preset-typescript": "^7",
|
||||||
"@dzeio/config": "^1.0.0",
|
"@dzeio/config": "^1",
|
||||||
"@types/node-fetch": "^2.5.10",
|
"@types/node-fetch": "^2",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
"@typescript-eslint/eslint-plugin": "^5",
|
||||||
"@typescript-eslint/parser": "^5.7.0",
|
"@typescript-eslint/parser": "^5",
|
||||||
"esbuild": "^0.14.5",
|
"esbuild": "^0.16.3",
|
||||||
"eslint": "^8.4.1",
|
"eslint": "^8",
|
||||||
"jest": "^27.0.5",
|
"jest": "^29",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"isomorphic-unfetch": "^3.1.0",
|
"isomorphic-unfetch": "^3",
|
||||||
"unfetch": "^4.2.0"
|
"unfetch": "^4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "node scripts/export-version-number.js",
|
"prebuild": "node scripts/export-version-number.js",
|
||||||
"build": "npm run prebuild && npm run build:cjs && npm run build:browser && npm run build:es2015",
|
"build": "npm run build:cjs && npm run build:browser && npm run build:es2015",
|
||||||
"build:cjs": "tsc --project tsconfig.json",
|
"build:cjs": "tsc --project tsconfig.json",
|
||||||
"build:es2015": "tsc --project tsconfig.es2015.json",
|
"build:es2015": "tsc --project tsconfig.es2015.json",
|
||||||
"build:browser": "esbuild ./src/tcgdex.browser.ts --bundle --minify --sourcemap --target=es2016,chrome90,firefox78,safari14,ios13,edge90 --outfile=dist/tcgdex.browser.js",
|
"build:browser": "esbuild ./src/tcgdex.browser.ts --bundle --minify --sourcemap --target=es2016,chrome90,firefox78,safari14,ios13,edge90 --outfile=dist/tcgdex.browser.js",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const { version } = require('../package.json')
|
const { version } = require('../package.json')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
|
||||||
fs.writeFileSync('./src/version.js', `export const version = ${JSON.stringify({version})}`)
|
fs.writeFileSync('./src/version.js', `export const version = '${version}'`)
|
||||||
|
@ -3,4 +3,9 @@ import unfetch from 'unfetch'
|
|||||||
|
|
||||||
TCGdex.fetch = window.fetch ?? unfetch as any
|
TCGdex.fetch = window.fetch ?? unfetch as any
|
||||||
|
|
||||||
(global ?? window).TCGdex = TCGdex
|
if (typeof global !== 'undefined') {
|
||||||
|
global.TCGdex = TCGdex
|
||||||
|
}
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
(window as any).TCGdex = TCGdex
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user