Compare commits
5 Commits
ac1a495140
...
cbe86a773a
| Author | SHA1 | Date | |
|---|---|---|---|
| cbe86a773a | |||
| 94d7a2f8cd | |||
| eafa758b5a | |||
| c0304794c6 | |||
| 29c27d27cb |
11
eslint.config.mjs
Normal file
11
eslint.config.mjs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import globals from "globals";
|
||||||
|
import pluginJs from "@eslint/js";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{files: ["**/*.{js,mjs,cjs,ts}"]},
|
||||||
|
{languageOptions: { globals: globals.node }},
|
||||||
|
pluginJs.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
];
|
||||||
12
jest.config.ts
Normal file
12
jest.config.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// jest.config.ts
|
||||||
|
import { createDefaultPreset, type JestConfigWithTsJest } from 'ts-jest';
|
||||||
|
|
||||||
|
const jestConfig: JestConfigWithTsJest = {
|
||||||
|
testEnvironment: "node",
|
||||||
|
preset: 'ts-jest/presets/js-with-ts-esm',
|
||||||
|
transform: {
|
||||||
|
"^.+.tsx?$": ["ts-jest",{}],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default jestConfig;
|
||||||
6196
package-lock.json
generated
Normal file
6196
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
35
package.json
35
package.json
|
|
@ -1,12 +1,17 @@
|
||||||
{
|
{
|
||||||
"name": "paapi5-nodejs-sdk",
|
"name": "paapi5-nodejs-sdk",
|
||||||
"version": "1.1.0",
|
"version": "2.1.0",
|
||||||
"description": "ProductAdvertisingAPI 5.0 NodeJS SDK",
|
"description": "ProductAdvertisingAPI 5.0 NodeJS SDK",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "src/index.js",
|
"main": "dist/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "./node_modules/mocha/bin/mocha --recursive",
|
"clean": "rimraf dist",
|
||||||
"lint": "eslint sampleGetBrowseNodesApi.js sampleGetItemsApi.js sampleSearchItemsApi.js sampleGetVariationsApi.js src/auth/*.js"
|
"build": "tsc",
|
||||||
|
"test": "jest",
|
||||||
|
"lint": "eslint src/**/*",
|
||||||
|
"watch:build": "tsc --watch",
|
||||||
|
"watch:test": "jest --watch",
|
||||||
|
"start": "npm-run-all clean --parallel watch:build --print-label"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Product Advertising API",
|
"name": "Product Advertising API",
|
||||||
|
|
@ -18,18 +23,24 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/amzn/paapi5-nodejs-sdk"
|
"url": "https://github.com/amzn/paapi5-nodejs-sdk"
|
||||||
},
|
},
|
||||||
"browser": {
|
|
||||||
"fs": false
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"superagent": "3.7.0",
|
"crypto-js": "^4.2.0",
|
||||||
"crypto-js": "^3.1.9-1"
|
"superagent": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^5.8.0",
|
"@eslint/js": "^9.7.0",
|
||||||
|
"@jest/globals": "^29.7.0",
|
||||||
|
"@types/jest": "^29.5.12",
|
||||||
|
"eslint": "^9.7.0",
|
||||||
"expect.js": "~0.3.1",
|
"expect.js": "~0.3.1",
|
||||||
"mocha": "^10.0.0",
|
"globals": "^15.8.0",
|
||||||
"sinon": "1.17.3"
|
"jest": "^29.7.0",
|
||||||
|
"rimraf": "^6.0.1",
|
||||||
|
"sinon": "^18.0.0",
|
||||||
|
"ts-jest": "^29.2.2",
|
||||||
|
"ts-node": "^10.9.2",
|
||||||
|
"typescript": "^5.5.3",
|
||||||
|
"typescript-eslint": "^7.16.1"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"amazon",
|
"amazon",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
/**
|
/**
|
||||||
|
* Converted from mocha to vitest and refactored to TypeScript by David A. Ball. (c) 2024.
|
||||||
|
*
|
||||||
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License").
|
* Licensed under the Apache License, Version 2.0 (the "License").
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*",
|
"src/**/*",
|
||||||
"tests/**/*"
|
"tests/**/*",
|
||||||
|
"examples/**/*",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user