PromucFlow_constructor/app/shared
dependabot[bot] 1397384812
chore: bump json5 from 2.2.1 to 2.2.3 in /app/shared/ast (#19431)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/releases">json5's releases</a>.</em></p>
<blockquote>
<h2>v2.2.3</h2>
<ul>
<li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">#299</a>)</li>
</ul>
<h2>v2.2.2</h2>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays.
(<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">#199</a>) This also fixes a prototype pollution vulnerability reported by
Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">#295</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/blob/main/CHANGELOG.md">json5's changelog</a>.</em></p>
<blockquote>
<h3>v2.2.3 [<a href="https://github.com/json5/json5/tree/v2.2.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.2...v2.2.3">diff</a>]</h3>
<ul>
<li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of
v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">#299</a>)</li>
</ul>
<h3>v2.2.2 [<a href="https://github.com/json5/json5/tree/v2.2.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.2">diff</a>]</h3>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays.
(<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">#199</a>) This also fixes a prototype pollution vulnerability reported by
Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">#295</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c3a7524277"><code>c3a7524</code></a> 2.2.3</li>
<li><a href="94fd06d82e"><code>94fd06d</code></a> docs: update CHANGELOG for v2.2.3</li>
<li><a href="3b8cebf0c4"><code>3b8cebf</code></a> docs(security): use GitHub security advisories</li>
<li><a href="f0fd9e194d"><code>f0fd9e1</code></a> docs: publish a security policy</li>
<li><a href="6a91a05fff"><code>6a91a05</code></a> docs(template): bug -&gt; bug report</li>
<li><a href="14f8cb186e"><code>14f8cb1</code></a> 2.2.2</li>
<li><a href="10cc7ca916"><code>10cc7ca</code></a> docs: update CHANGELOG for v2.2.2</li>
<li><a href="7774c10979"><code>7774c10</code></a> fix: add <strong>proto</strong> to objects and arrays</li>
<li><a href="edde30abd8"><code>edde30a</code></a> Readme: slight tweak to intro</li>
<li><a href="97286f8bd5"><code>97286f8</code></a> Improve example in readme</li>
<li>Additional commits viewable in <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=json5&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=2.2.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/appsmithorg/appsmith/network/alerts).

</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 18:24:57 +05:30
..
ast chore: bump json5 from 2.2.1 to 2.2.3 in /app/shared/ast (#19431) 2023-01-02 18:24:57 +05:30
.gitignore fix: workflow for shared modules testing (#16778) 2022-09-30 18:36:25 +05:30
build-shared-dep.js feat: ast mono repo poc (#15610) 2022-08-11 20:59:26 +05:30
install-dependencies.js feat: ast mono repo poc (#15610) 2022-08-11 20:59:26 +05:30
package.json fix: workflow for shared modules testing (#16778) 2022-09-30 18:36:25 +05:30
Readme.md feat: AST apis for parsing script and returning identifiers (#16252) 2022-09-12 14:45:47 +05:30
run-tests.js fix: workflow for shared modules testing (#16778) 2022-09-30 18:36:25 +05:30
shared-dependencies.json feat: AST apis for parsing script and returning identifiers (#16252) 2022-09-12 14:45:47 +05:30
verify-shared-dep.js feat: ast mono repo poc (#15610) 2022-08-11 20:59:26 +05:30

Shared Dependencies

We wanted to share common logic with different applications within our repo, so we picked yarn symlinks as our approach to tackle this problem. Following are the way in which you can take advantage of the module sharing architecture.

Creation of a Shared Module

  • Create a directory inside shared directory with name eg. abc
  • Inside package.json of module, keep the name like @shared/abc
  • Add a rollup config to generate package.json after the module is build

Installation of Shared Modules

  • Add an entry for an application inside shared-dependencies.json eg. for client there should be an entry "client": []
  • Add the name of the shared module in the entry of the application in the above file eg. "client": ["@shared/abc"]
  • If the application does not have any postinstall or preinstall scripts for shared modules then add the two commands described below in the application's (eg. client) package.json : "postinstall": "CURRENT_SCOPE=client node ../shared/install-dependencies.js" "preinstall": "CURRENT_SCOPE=client node ../shared/build-shared-dep.js" CURRENT_SCOPE is the environment variable that's being used in the scripts

Verifying the Installed Shared Modules

  • Run yarn run verify inside shared directory to verify shared dependencies for an application.
  • yarn install : installs packages
  • rollup -c : Module bundler bundles the package and creates a build
  • cd build : Change the present working directory
  • cp -R ../node_modules ./node_modules : copies its own node_modules directory to its build directory to make sure its own version dependencies do not mismatch when its installed in other directories as shared module
  • yarn link : Creates a link for the package to make it available for other directories to use.