Skip to content

Commit

Permalink
fix(react): workaround non-bundled dependency (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsonsj authored Dec 11, 2023
1 parent b73feea commit 7250705
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slate-serializers/source",
"version": "2.1.4",
"version": "2.1.5",
"license": "MIT",
"scripts": {
"test": "nx run-many --all --target=test",
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slate-serializers/dom",
"version": "2.1.4",
"version": "2.1.5",
"description": "Serialize Slate JSON objects to the DOM. Can be used with `htmlparser2` and associated utilities to modify the DOM and generate HTML. Used by other serializers in this monorepo.",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion packages/html/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@slate-serializers/html",
"version": "2.1.4",
"version": "2.1.5",
"type": "commonjs"
}
5 changes: 4 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@slate-serializers/react",
"version": "2.1.4"
"version": "2.1.5",
"dependencies": {
"@slate-serializers/dom": "2.1.5"
}
}
7 changes: 7 additions & 0 deletions packages/react/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
"projectType": "library",
"tags": [],
"targets": {
"deploy": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public",
"buildTarget": "production"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
Expand Down
2 changes: 1 addition & 1 deletion packages/slate-serializers/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "slate-serializers",
"version": "2.1.4",
"version": "2.1.5",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion packages/template/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@slate-serializers/template",
"version": "2.1.4",
"version": "2.1.5",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion packages/tests/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@slate-serializers/tests",
"version": "2.1.4",
"version": "2.1.5",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion packages/utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@slate-serializers/utilities",
"version": "2.1.4",
"version": "2.1.5",
"type": "commonjs"
}
16 changes: 12 additions & 4 deletions tools/sync-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@ const glob = require('glob');
const fs = require('fs');

glob.sync('./packages/**/package.json')
.forEach(location =>
.forEach(location => {
const packageJson = JSON.parse(fs.readFileSync(location))
fs.writeFileSync(location, JSON.stringify({
...JSON.parse(fs.readFileSync(location)),
version: mainPackageJson.version
...packageJson,
version: mainPackageJson.version,
...(packageJson.dependencies?.['@slate-serializers/dom'] && {
dependencies: {
...packageJson.dependencies,
"@slate-serializers/dom": mainPackageJson.version
}
}),
}, null, 3))
);
}
);

0 comments on commit 7250705

Please sign in to comment.