Skip to content

Commit

Permalink
autorelease fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelle committed Feb 11, 2024
1 parent 37b7c2e commit d9d34ab
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 24 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"homepage": ".",
"prettier": "@excalidraw/prettier-config",
"scripts": {
"clean-setup": "rm -rf node_modules && rm -rf packages/*/node_modules && rm -rf examples/*/node_modules && rm -rf dist && rm -rf packages/*/dist && rm -rf build && rm -rf packages/*/build && yarn",
"build-node": "node ./scripts/build-node.js",
"build:app:docker": "cross-env VITE_APP_DISABLE_SENTRY=true VITE_APP_DISABLE_TRACKING=true vite build",
"build:app": "cross-env VITE_APP_GIT_SHA=$VERCEL_GIT_COMMIT_SHA vite build",
Expand Down
2 changes: 1 addition & 1 deletion packages/excalidraw/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@dwelle/excalidraw",
"name": "@excalidraw/excalidraw",
"version": "0.5.0",
"type": "module",
"main": "./dist/prod/index.js",
Expand Down
12 changes: 8 additions & 4 deletions packages/excalidraw/tests/scene/export.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,14 @@ describe("exporting frames", () => {
);

const svg = await exportToSvg({
elements: exportedElements,
files: null,
exportPadding: 0,
exportingFrame,
data: {
elements: exportedElements,
files: null,
},
config: {
padding: 0,
exportingFrame,
},
});

// frame shouldn't be exported
Expand Down
17 changes: 15 additions & 2 deletions scripts/autorelease-fork.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,31 @@ const publish = () => {

fs.writeFileSync(excalidrawPackage, JSON.stringify(pkg, null, 2), "utf8");

console.info("installing deps...");
execSync(`yarn --frozen-lockfile`);
execSync(`yarn --frozen-lockfile`, { cwd: excalidrawDir });

console.info("bulding package...");
execSync(`yarn run build:esm`, { cwd: excalidrawDir });
execSync(`yarn --cwd ${excalidrawDir} publish`);

console.info("publishing package...");
pkg.name = "@dwelle/excalidraw";
fs.writeFileSync(excalidrawPackage, JSON.stringify(pkg, null, 2), "utf8");
execSync(`npm publish`, { cwd: excalidrawDir });

console.info(`Published ${pkg.name}@latest 🎉`);
core.setOutput(
"result",
`**Latest version has been published** [@dwelle/excalidraw@${pkg.version}](https://www.npmjs.com/package/@excalidraw/excalidraw/v/${pkg.version}) :rocket:`,
);
} catch (error) {
core.setOutput("result", "package couldn't be published :warning:!");
console.error(error);
if (error.output) {
console.error("stdout:", error.output[1]?.toString());
console.error("stderr:", error.output[2]?.toString());
} else {
console.error(error);
}
process.exit(1);
}
};
Expand Down
29 changes: 12 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2153,11 +2153,6 @@
resolved "https://registry.yarnpkg.com/@excalidraw/eslint-config/-/eslint-config-1.0.3.tgz#2122ef7413ae77874ae9848ce0f1c6b3f0d8bbbd"
integrity sha512-GemHNF5Z6ga0BWBSX7GJaNBUchLu6RwTcAB84eX1MeckRNhNasAsPCdelDlFalz27iS4RuYEQh0bPE8SRxJgbQ==

"@excalidraw/excalidraw@*":
version "0.17.2"
resolved "https://registry.yarnpkg.com/@excalidraw/excalidraw/-/excalidraw-0.17.2.tgz#9a636a1e6bb3c88c5883347d3a7e75e9cce8ab96"
integrity sha512-7pqUWD8+mPjDhF4XxG3gw4rvE2JGaLW3Vss5UZfTbITPxAtFaGEc1K081bncitnaYhUwN9ENJE0i87QB3poDwQ==

"@excalidraw/laser-pointer@1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@excalidraw/laser-pointer/-/laser-pointer-1.3.1.tgz#7c40836598e8e6ad91f01057883ed8b88fb9266c"
Expand Down Expand Up @@ -3461,9 +3456,9 @@
undici-types "~5.26.4"

"@types/node@^20":
version "20.11.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.1.tgz#6a93f94abeda166f688d3d2aca18012afbe5f850"
integrity sha512-DsXojJUES2M+FE8CpptJTKpg+r54moV9ZEncPstni1WHFmTcCzeFLnMFfyhCVS8XNOy/OQG+8lVxRLRrVHmV5A==
version "20.11.16"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.16.tgz#4411f79411514eb8e2926f036c86c9f0e4ec6708"
integrity sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==
dependencies:
undici-types "~5.26.4"

Expand Down Expand Up @@ -3502,9 +3497,9 @@
"@types/react" "^17"

"@types/react-dom@^18":
version "18.2.18"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.18.tgz#16946e6cd43971256d874bc3d0a72074bb8571dd"
integrity sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==
version "18.2.19"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.19.tgz#b84b7c30c635a6c26c6a6dfbb599b2da9788be58"
integrity sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==
dependencies:
"@types/react" "*"

Expand All @@ -3527,9 +3522,9 @@
csstype "^3.0.2"

"@types/react@^18":
version "18.2.48"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.48.tgz#11df5664642d0bd879c1f58bc1d37205b064e8f1"
integrity sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==
version "18.2.55"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.55.tgz#38141821b7084404b5013742bc4ae08e44da7a67"
integrity sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
Expand Down Expand Up @@ -4711,9 +4706,9 @@ caniuse-lite@^1.0.30001449:
integrity sha512-gMhDyXGItTHipJj2ApIvR+iVB5hd0KP3svMWWXDvZOmjzJJassGLMfxRkQCSYgGd2gtdL/ReeiyvMSFD1Ss6Mw==

caniuse-lite@^1.0.30001579:
version "1.0.30001579"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz#45c065216110f46d6274311a4b3fcf6278e0852a"
integrity sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==
version "1.0.30001585"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz#0b4e848d84919c783b2a41c13f7de8ce96744401"
integrity sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==

canvas-roundrect-polyfill@0.0.1:
version "0.0.1"
Expand Down

0 comments on commit d9d34ab

Please sign in to comment.