diff --git a/packages/scales/index.d.ts b/packages/scales/legacy/index.d.ts similarity index 100% rename from packages/scales/index.d.ts rename to packages/scales/legacy/index.d.ts diff --git a/packages/scales/package.json b/packages/scales/package.json index 493e5c2e4..aa04f83e1 100644 --- a/packages/scales/package.json +++ b/packages/scales/package.json @@ -13,20 +13,22 @@ }, "main": "./dist/nivo-scales.cjs.js", "module": "./dist/nivo-scales.es.js", + "typings": "./dist/types/index.d.ts", "files": [ "README.md", "LICENSE.md", - "index.d.ts", - "dist/" + "dist/", + "!dist/tsconfig.tsbuildinfo" ], "dependencies": { "d3-scale": "^3.2.3", "d3-time": "^1.0.11", - "d3-time-format": "^2.1.3", + "d3-time-format": "^3.0.0", "lodash": "^4.17.21" }, - "peerDependencies": { - "prop-types": ">= 15.5.10 < 16.0.0" + "devDependencies": { + "@types/d3-scale": "^3.2.2", + "@types/d3-time-format": "^3.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/scales/src/index.js b/packages/scales/src/index.ts similarity index 100% rename from packages/scales/src/index.js rename to packages/scales/src/index.ts diff --git a/packages/scales/tsconfig.json b/packages/scales/tsconfig.json new file mode 100644 index 000000000..855b4b2b7 --- /dev/null +++ b/packages/scales/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.types.json", + "compilerOptions": { + "outDir": "./dist/types", + "rootDir": "./src" + }, + "include": ["src/**/*"] +} diff --git a/tsconfig.monorepo.json b/tsconfig.monorepo.json index 80d462fc5..65c56e55d 100644 --- a/tsconfig.monorepo.json +++ b/tsconfig.monorepo.json @@ -9,7 +9,7 @@ { "path": "./packages/axes" }, { "path": "./packages/colors" }, { "path": "./packages/legends" }, - // { "path": "./packages/scales" }, + { "path": "./packages/scales" }, { "path": "./packages/tooltip" }, { "path": "./packages/arcs" }, diff --git a/yarn.lock b/yarn.lock index 7e9e48e11..2bd0bf82d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6031,6 +6031,11 @@ resolved "https://registry.yarnpkg.com/@types/d3-time-format/-/d3-time-format-2.3.1.tgz#87a30e4513b9d1d53b920327a361f87255bf3372" integrity sha512-fck0Z9RGfIQn3GJIEKVrp15h9m6Vlg0d5XXeiE/6+CQiBmMDZxfR21XtjEPuDeg7gC3bBM0SdieA5XF3GW1wKA== +"@types/d3-time-format@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/d3-time-format/-/d3-time-format-3.0.0.tgz#913e984362a59792dc8d8b122dd17625991eade2" + integrity sha512-UpLg1mn/8PLyjr+J/JwdQJM/GzysMvv2CS8y+WYAL5K0+wbvXv/pPSLEfdNaprCZsGcXTxPsFMy8QtkYv9ueew== + "@types/d3-time@*": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-2.0.0.tgz#831dd093db91f16b83ba980e194bb8e4bcef44d6" @@ -10505,30 +10510,23 @@ d3-shape@^1.2.0, d3-shape@^1.2.2, d3-shape@^1.3.5: dependencies: d3-path "1" -"d3-time-format@2 - 3": +"d3-time-format@2 - 3", d3-time-format@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-3.0.0.tgz#df8056c83659e01f20ac5da5fdeae7c08d5f1bb6" integrity sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag== dependencies: d3-time "1 - 2" -d3-time-format@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.1.3.tgz#ae06f8e0126a9d60d6364eac5b1533ae1bac826b" - integrity sha512-6k0a2rZryzGm5Ihx+aFMuO1GgelgIz+7HhB4PH4OEndD5q2zGn1mDfRdNrulspOfR6JXkb2sThhDK41CSK85QA== - dependencies: - d3-time "1" - -d3-time@1, d3-time@^1.0.10, d3-time@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.0.11.tgz#1d831a3e25cd189eb256c17770a666368762bbce" - integrity sha512-Z3wpvhPLW4vEScGeIMUckDW7+3hWKOQfAWg/U7PlWBnQmeKQ00gCUsTtWSYulrKNA7ta8hJ+xXc6MHrMuITwEw== - "d3-time@1 - 2": version "2.0.0" resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-2.0.0.tgz#ad7c127d17c67bd57a4c61f3eaecb81108b1e0ab" integrity sha512-2mvhstTFcMvwStWd9Tj3e6CEqtOivtD8AUiHT8ido/xmzrI9ijrUUihZ6nHuf/vsScRBonagOdj0Vv+SEL5G3Q== +d3-time@^1.0.10, d3-time@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.0.11.tgz#1d831a3e25cd189eb256c17770a666368762bbce" + integrity sha512-Z3wpvhPLW4vEScGeIMUckDW7+3hWKOQfAWg/U7PlWBnQmeKQ00gCUsTtWSYulrKNA7ta8hJ+xXc6MHrMuITwEw== + d3-timer@1: version "1.0.9" resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-1.0.9.tgz#f7bb8c0d597d792ff7131e1c24a36dd471a471ba"