Files
cms/package.json
T
libretech cbcc54bd75 test(checkout): add dependency-free unit tests that pin the checkout defects
npm test runs node:test on the TypeScript sources with Node's type stripping
(Node 22.14 in the image, Node 24 locally), with no dependencies.

Node, unlike tsc, does not resolve extensionless relative imports. TypeScript
5.2 cannot emit .ts import extensions. tests/unit/support therefore registers
a small resolve hook that appends ".ts" for imports from .ts files.

- pricing, paypal-order, log-format: characterization tests of the current
  output.
- The known defects of
  libretech/mp#67 are tests of the correct
  behaviour, marked todo: null, two-line and price-null addresses and
  deliveries, a deleted product, the payment surcharge missing from the
  breakdown, and in the log line circular JSON, the Basic credentials of an
  axios error, and an Error rendered as {}.
- That the breakdown adds up to the amount holds today, including for the
  subtotals closest to a half cent, so that test is a regular one.

Refs libretech/mp#71
2026-10-08 22:15:57 +02:00

42 lines
1.5 KiB
JSON

{
"name": "cms",
"version": "1.0.0",
"scripts": {
"develop": "DEBUG=app:* npm run strapi develop -- --debug --bundler vite",
"start": "strapi start",
"build": "strapi build --debug",
"strapi": "strapi",
"lint:fix": "prettier --write \"{src,types,config}/**/*.{js,jsx,ts,tsx}\"",
"test": "node --experimental-strip-types --import ./tests/unit/support/register.mjs --test 'tests/unit/**/*.test.ts'",
"generate:types": "strapi ts:generate-types",
"import": "npm run strapi import -- -f database/export.tar.gz --force",
"export": "npm run strapi export -- --no-encrypt --file database/export_$(date +'%Y%m%d%H%M%S')",
"transfer-pull": "npm run strapi transfer -- --from $TRANSFER_URL --from-token $TRANSFER_FROM_TOKEN",
"transfer-push": "npm run strapi transfer -- --to $TRANSFER_URL --to-token $TRANSFER_TO_TOKEN --force"
},
"dependencies": {
"@paypal/paypal-server-sdk": "^0.6.1",
"@strapi/plugin-documentation": "4.25.21",
"@strapi/plugin-i18n": "4.25.21",
"@strapi/plugin-users-permissions": "4.25.21",
"@strapi/strapi": "4.25.21",
"@strapi/utils": "4.25.21",
"lodash": "^4.17.21",
"pg": "^8.11.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^5.2.0",
"sharp": "^0.33.5",
"strapi-plugin-populate-deep": "^3.0.1",
"strapi-prometheus": "^1.9.2",
"styled-components": "^5.2.1",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/lodash": "^4.17.15",
"@types/node-fetch": "^2.6.11",
"@types/uuid": "^10.0.0",
"prettier": "^3.0.0"
}
}