Загрузка данных


{
  "name": "moex-chart",
  "version": "0.1.0",
  "description": "",
  "type": "module",
  "main": "dist/index.cjs",
  "types": "types/index.d.ts",
  "files": [
    "dist",
    "types"
  ],
  "sideEffects": [
    "**/*css",
    "**/*.scss"
  ],
  "exports": {
    ".": {
      "import": "./dist/index.js",
      "require": "./dist/index.cjs",
      "types": "./types/index.d.ts"
    },
    "./package.json": "./package.json",
    "./dist/styles.css": {
      "import": "./dist/styles.css",
      "require": "./dist/styles.css"
    }
  },
  "scripts": {
    "postbuild:storybook": "sed -i 's#<head>#<head>\\n<base href='/storybook/'>#' ./storybook-static/index.html ./storybook-static/iframe.html",
    "clean:dist": "powershell -NoProfile -Command \"if (Test-Path dist) { Remove-Item -Recurse -Force dist }\"",
    "clean:types": "powershell -NoProfile -Command \"if (Test-Path types) { Remove-Item -Recurse -Force types }\"",
    "build:lib:js": "webpack --config webpack.lib.config.cjs",
    "build:lib:types": "tsc --project tsconfig.types.json && tsc-alias -p tsconfig.types.json",
    "build:lib": "npm run clean:dist && npm run clean:types && npm run build:lib:js && npm run build:lib:types",
    "test": "jest",
    "test:related": "jest --findRelatedTests --passWithNoTests",
    "coverage": "jest --coverage",
    "lint:fix": "npx prettier src --write && npx eslint src --fix",
    "lint": "npx eslint src",
    "prettier-check": "npx prettier src --check",
    "prettier-fix": "npx prettier src --write",
    "prepare": "husky",
    "storybook": "storybook dev -p 6006",
    "storybook-local": "cross-env buildType=local storybook dev -p 6006",
    "start": "npm run storybook-local",
    "build-storybook": "storybook build",
    "build-storybook-local": "cross-env buildType=local storybook build",
    "typecheck": "npx tsc -p tsconfig.json --noEmit",
    "typecheck:watch": "npx tsc -p tsconfig.json --noEmit -w"
  },
  "keywords": [],
  "author": "MOEX",
  "license": "UNLICENSED",
  "devDependencies": {
    "@babel/core": "^7.21.0",
    "@babel/preset-env": "^7.28.3",
    "@babel/preset-react": "^7.27.1",
    "@babel/preset-typescript": "^7.27.1",
    "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
    "@storybook/addon-actions": "^7.6.13",
    "@storybook/addon-controls": "^7.6.13",
    "@storybook/addon-docs": "^7.6.13",
    "@storybook/addon-essentials": "^7.6.13",
    "@storybook/addon-interactions": "^7.6.13",
    "@storybook/addon-links": "^7.6.13",
    "@storybook/builder-webpack5": "^7.6.13",
    "@storybook/components": "^7.6.13",
    "@storybook/manager-webpack5": "^6.5.16",
    "@storybook/preset-scss": "^1.0.3",
    "@storybook/react": "^7.6.13",
    "@storybook/react-webpack5": "^7.6.13",
    "@storybook/testing-library": "^0.0.13",
    "@testing-library/dom": "^9.3.4",
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@types/jest": "^27.5.2",
    "@types/lodash-es": "^4.17.12",
    "@types/markdown-it": "^14.0.1",
    "@types/markdown-it-link-attributes": "^3.0.5",
    "@types/react": "^18.0.28",
    "@types/react-dom": "^18.0.10",
    "@types/react-window": "^1.8.5",
    "@types/sanitize-html": "^2.11.0",
    "@typescript-eslint/eslint-plugin": "^5.52.0",
    "@typescript-eslint/parser": "^5.52.0",
    "autoprefixer": "^10.4.21",
    "babel-loader": "^8.3.0",
    "copy-webpack-plugin": "^11.0.0",
    "cross-env": "^7.0.3",
    "css-loader": "^6.7.3",
    "css-minimizer-webpack-plugin": "^3.4.1",
    "dotenv-webpack": "^8.0.1",
    "eslint": "^8.34.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-config-prettier": "^8.6.0",
    "eslint-import-resolver-typescript": "^3.10.1",
    "eslint-import-resolver-webpack": "^0.13.2",
    "eslint-plugin-eslint-comments": "^3.2.0",
    "eslint-plugin-import": "^2.31.0",
    "eslint-plugin-jest": "^25.7.0",
    "eslint-plugin-jsx-a11y": "^6.7.1",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-react": "^7.32.2",
    "eslint-plugin-react-hooks": "^4.6.0",
    "file-loader": "^6.2.0",
    "html-webpack-plugin": "^5.5.0",
    "husky": "^9.1.5",
    "jest": "^29.7.0",
    "jest-environment-jsdom": "^29.5.0",
    "json5": "^2.2.3",
    "mini-css-extract-plugin": "^2.7.2",
    "postcss": "^8.5.6",
    "postcss-loader": "^4.3.0",
    "prettier": "^3.3.3",
    "react": "^18.2.0",
    "react-docgen-typescript-plugin": "^0.5.1",
    "react-dom": "^18.2.0",
    "react-refresh": "^0.14.0",
    "react-refresh-typescript": "^2.0.8",
    "sass": "^1.58.1",
    "sass-loader": "^13.2.0",
    "storybook": "^7.6.13",
    "storybook-addon-sass-postcss": "^0.1.3",
    "style-loader": "^3.3.1",
    "terser-webpack-plugin": "^5.3.6",
    "ts-jest": "^29.1.5",
    "ts-loader": "^9.4.2",
    "ts-node": "10.9.1",
    "tsc-alias": "^1.8.16",
    "type-fest": "^3.6.1",
    "typescript": "^5.5.3",
    "typescript-plugin-css-modules": "^4.1.1",
    "webpack": "^5.75.0",
    "webpack-cli": "^5.1.4",
    "webpack-dev-server": "^4.11.1"
  },
  "dependencies": {
    "@dnd-kit/core": "^6.1.0",
    "@dnd-kit/modifiers": "^7.0.0",
    "@dnd-kit/sortable": "^8.0.0",
    "@dnd-kit/utilities": "^3.2.2",
    "@stomp/stompjs": "^7.1.1",
    "classnames": "^2.3.2",
    "dayjs": "^1.11.7",
    "dotenv": "^16.4.7",
    "exchange-elements": "^0.0.257",
    "fancy-canvas": "2.1.0",
    "lightweight-charts": "5.2.0",
    "lodash-es": "^4.17.21",
    "rxjs": "^7.8.2",
    "uuid": "^11.0.3"
  },
  "peerDependencies": {
    "react": "18.2.0",
    "react-dom": "18.2.0"
  },
  "overrides": {
    "@storybook/mdx2-csf": "1.0.0"
  },
  "lint-staged": {
    "*.{ts,tsx}": [
      "npm run lint:fix",
      "npm run test:related --"
    ],
    "*.{js,jsx,css,scss,md,html}": [
      "npm run lint:fix"
    ]
  }
}





import { readFileSync } from 'fs';

import JSON5 from 'json5';

import { pathsToModuleNameMapper } from 'ts-jest';

import type { Config } from '@jest/types';

const fileContent = readFileSync('./tsconfig.json');
const fileContentJSON = JSON5.parse(fileContent.toString());

const config: Config.InitialOptions = {
  // нужен пакет, который поддержит резолв scss модуля
  // transform: {
  //   "\\.scss$": "jest-sass",
  // },
  clearMocks: true,
  resetMocks: true,
  restoreMocks: true,
  preset: 'ts-jest',
  transform: {
    '^.+\\.tsx?$': 'ts-jest',
  },
  testEnvironment: 'jsdom',
  moduleDirectories: ['node_modules', '<rootDir>'],
  moduleNameMapper: {
    ...pathsToModuleNameMapper(fileContentJSON.compilerOptions.paths),
    '^exchange-elements/v2$': '<rootDir>/node_modules/exchange-elements/dist/v2.cjs.js',
    '\\.(css|scss|module.scss)$': '<rootDir>/__mocks__/styleMock.js',
  },
  coverageDirectory: '<rootDir>/coverage',
  coverageReporters: ['text', 'lcov'],
};

export default config;





// eslint-disable-next-line import/no-extraneous-dependencies
import '@testing-library/jest-dom';