Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/auto ref url #169

Merged
merged 4 commits into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@ module.exports = (api) => {
return {
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
plugins: ['@babel/plugin-proposal-object-rest-spread', '@babel/transform-runtime'],
env: {
test: {
plugins: ['require-context-hook'],
},
},
};
};
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/design-system",
"version": "6.0.0-debug.0",
"version": "6.0.0",
"description": "Storybook design system",
"repository": {
"type": "git",
Expand All @@ -16,13 +16,13 @@
"dist"
],
"scripts": {
"build": "babel src -d dist --extensions \".js,.jsx,.ts,.tsx\"",
"build": "babel src -d dist --extensions \".js,.jsx,.ts,.tsx\" --ignore \"**/*.test.js\" --ignore \"**/*.stories.js\"",
"build-docs": "build-storybook --docs",
"build-storybook": "build-storybook",
"lint": "eslint .",
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.html,.ts,.tsx,.mjs --report-unused-disable-directives",
"lint:package": "sort-package-json",
"release": "npm run build && ./scripts/release.sh",
"release": "npm run build && npx ts-node ./scripts/update-chromatic-url.ts && npx sort-package-json && ./scripts/release.sh",
"storybook": "start-storybook -p 6006"
},
"husky": {
Expand Down Expand Up @@ -72,19 +72,19 @@
"auto": "^7.11.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-require-context-hook": "^1.0.0",
"babel-plugin-styled-components": "^1.10.7",
"chromatic": "^5.0.0-alpha.4",
"cross-env": "^7.0.2",
"eslint": "^7.1.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.7",
"lint-staged": "^10.2.9",
"node-fetch": "^2.6.0",
"prettier": "^2.0.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"sort-package-json": "^1.44.0",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3"
"typescript": "^3.9.5"
},
"peerDependencies": {
"react": "^15.0.0 || ^16.0.0",
Expand All @@ -106,6 +106,6 @@
},
"storybook": {
"title": "Storybook Design System",
"url": "https://deploy-preview-166--storybook-design-system.netlify.app"
"url": "https://5ccbc373887ca40020446347-kfurrsajwz.chromatic.com/"
}
}
26 changes: 26 additions & 0 deletions scripts/update-chromatic-url.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable import/no-extraneous-dependencies */
import fetch from 'node-fetch';
import { join } from 'path';
import { readJson, writeJson } from 'fs-extra';

const run = async () => {
const { url } = await fetch('https://master--5ccbc373887ca40020446347.chromatic.com');
const packageLocation = join(__dirname, '..', 'package.json');

const existing = await readJson(packageLocation);

const contents = {
...existing,
storybook: {
...existing.storybook,
url,
},
};

await writeJson(packageLocation, contents, { spaces: 2 });
};

run().catch(e => {
console.error(e);
process.exit(1);
});
66 changes: 15 additions & 51 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5626,11 +5626,6 @@ clone-deep@^0.2.4:
lazy-cache "^1.0.3"
shallow-clone "^0.1.2"

clone@^1.0.2:
version "1.0.4"
resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4=

clone@^2.1.2:
version "2.1.2"
resolved "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
Expand Down Expand Up @@ -6306,13 +6301,6 @@ deepmerge@^4.0.0, deepmerge@^4.2.2:
resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==

defaults@^1.0.3:
version "1.0.3"
resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=
dependencies:
clone "^1.0.2"

define-properties@^1.1.2, define-properties@^1.1.3:
version "1.1.3"
resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
Expand Down Expand Up @@ -6659,11 +6647,6 @@ elegant-spinner@^1.0.1:
resolved "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e"
integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=

elegant-spinner@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-2.0.0.tgz#f236378985ecd16da75488d166be4b688fd5af94"
integrity sha512-5YRYHhvhYzV/FC4AiMdeSIg3jAYGq9xFvbhZMpPlJoBsfYgrw2DSCYeXfat6tYBu45PWiyRr3+flaCPPmviPaA==

element-resize-detector@^1.2.1:
version "1.2.1"
resolved "https://registry.npmjs.org/element-resize-detector/-/element-resize-detector-1.2.1.tgz#b0305194447a4863155e58f13323a0aef30851d1"
Expand Down Expand Up @@ -9928,19 +9911,20 @@ lines-and-columns@^1.1.6:
resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=

lint-staged@^10.2.7:
version "10.2.7"
resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-10.2.7.tgz#6e47860af3d86a6a01849cbf8ba80f7754aae6eb"
integrity sha512-srod2bTpF8riaLz+Bgr6v0mI/nSntE8M9jbh4WwAhoosx0G7RKEUIG7mI5Nu5SMbTF9o8GROPgK0Lhf5cDnUUw==
lint-staged@^10.2.9:
version "10.2.9"
resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-10.2.9.tgz#6013ecfa80829cd422446b545fd30a96bca3098c"
integrity sha512-ziRAuXEqvJLSXg43ezBpHxRW8FOJCXISaXU//BWrxRrp5cBdRkIx7g5IsB3OI45xYGE0S6cOacfekSjDyDKF2g==
dependencies:
chalk "^4.0.0"
cli-truncate "2.1.0"
commander "^5.1.0"
cosmiconfig "^6.0.0"
debug "^4.1.1"
dedent "^0.7.0"
enquirer "^2.3.5"
execa "^4.0.1"
listr2 "^2.0.2"
listr2 "^2.1.0"
log-symbols "^4.0.0"
micromatch "^4.0.2"
normalize-path "^3.0.0"
Expand Down Expand Up @@ -9977,25 +9961,19 @@ listr-verbose-renderer@^0.5.0:
date-fns "^1.27.2"
figures "^2.0.0"

listr2@^2.0.2:
version "2.0.4"
resolved "https://registry.npmjs.org/listr2/-/listr2-2.0.4.tgz#b39100b0a227ec5659dcf76ddc516211fc168d61"
integrity sha512-oJaAcplPsa72rKW0eg4P4LbEJjhH+UO2I8uqR/I2wzHrVg16ohSfUy0SlcHS21zfYXxtsUpL8YXGHjyfWMR0cg==
listr2@^2.1.0:
version "2.1.3"
resolved "https://registry.npmjs.org/listr2/-/listr2-2.1.3.tgz#f527e197de12ad8c488c566921fa2da34cbc67f6"
integrity sha512-6oy3QhrZAlJGrG8oPcRp1hix1zUpb5AvyvZ5je979HCyf48tIj3Hn1TG5+rfyhz30t7HfySH/OIaVbwrI2kruA==
dependencies:
"@samverschueren/stream-to-observable" "^0.3.0"
chalk "^4.0.0"
cli-cursor "^3.1.0"
cli-truncate "^2.1.0"
elegant-spinner "^2.0.0"
enquirer "^2.3.5"
figures "^3.2.0"
indent-string "^4.0.0"
log-update "^4.0.0"
p-map "^4.0.0"
pad "^3.2.0"
rxjs "^6.5.5"
through "^2.3.8"
uuid "^7.0.2"

[email protected]:
version "0.14.3"
Expand Down Expand Up @@ -11224,13 +11202,6 @@ p-try@^2.0.0:
resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==

pad@^3.2.0:
version "3.2.0"
resolved "https://registry.npmjs.org/pad/-/pad-3.2.0.tgz#be7a1d1cb6757049b4ad5b70e71977158fea95d1"
integrity sha512-2u0TrjcGbOjBTJpyewEl4hBO3OeX5wWue7eIFPzQTg6wFSvoaHcBTTUY5m+n0hd04gmTCPuY0kCpVIVuw5etwg==
dependencies:
wcwidth "^1.0.1"

pako@~1.0.5:
version "1.0.11"
resolved "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
Expand Down Expand Up @@ -14482,10 +14453,10 @@ typescript-memoize@^1.0.0-alpha.3:
dependencies:
core-js "2.4.1"

typescript@^3.9.3:
version "3.9.3"
resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a"
integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==
typescript@^3.9.5:
version "3.9.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36"
integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==

typical@^4.0.0:
version "4.0.0"
Expand Down Expand Up @@ -14856,7 +14827,7 @@ uuid@^3.1.0, uuid@^3.3.2, uuid@^3.3.3:
resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==

uuid@^7.0.2, uuid@^7.0.3:
uuid@^7.0.3:
version "7.0.3"
resolved "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b"
integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==
Expand Down Expand Up @@ -15075,13 +15046,6 @@ watchpack@^1.6.1:
graceful-fs "^4.1.2"
neo-async "^2.5.0"

wcwidth@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=
dependencies:
defaults "^1.0.3"

web-namespaces@^1.0.0, web-namespaces@^1.1.2:
version "1.1.4"
resolved "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec"
Expand Down