Skip to content

Commit b8933d8

Browse files
authored
feat: Version Control and Tagging (Packages) (#2842)
## Description Provide a concise summary of the changes made in this pull request - ## Pull request type Check the appropriate box: - [ ] Review Fixes - [ ] Documentation Overhaul - [ ] Feature/Story - Link one or more Engineering Tickets * - [ ] A-Force - [ ] Error in documentation - [ ] Maintenance ## Documentation tickets Link to one or more documentation tickets: - ## Checklist From the below options, select the ones that are applicable: - [ ] Checked for Grammarly suggestions. - [ ] Adhered to the writing checklist. - [ ] Adhered to the media checklist. - [ ] Verified and updated cross-references or added redirect rules. - [ ] Tested the redirect rules on deploy preview. - [ ] Validated the modifications made to the content on the deploy preview. - [ ] Validated the CSS modifications on different screen sizes.
1 parent d2b9b74 commit b8933d8

File tree

5 files changed

+102
-10
lines changed

5 files changed

+102
-10
lines changed

website/docs/packages/how-to-guides/pass-date-between-modules.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ export default {
117117

118118

119119

120-
3. Publish the package.
120+
3. **Publish** the Package from top-right corner. This allows the changes to reflect on the app side.
121+
122+
<dd>
123+
124+
If the package is git-connected, you also need to release a new version for the changes to be available. For more details, refer to [Package Version Control](/packages/reference/versioning).
125+
126+
</dd>
121127

122128
4. Open your App from the homepage and ensure that both the app and modules share the same workspace.
123129

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Package Version Control
2+
3+
This page provides information about versioning and tagging in Packages. You can connect a Package to any Git remote repository, similar to applications. When a Package is Git-connected, you can commit changes, merge branches, and create tagged releases.
4+
5+
A Package repository is separate from the application's repository. If a Package is not connected to Git, the latest version is always used, and manual versioning is not available. To connect a Package to Git, see [Version Control With Git](/advanced-concepts/version-control-with-git).
6+
7+
8+
## Managing Package Versions
9+
10+
You can manage versions of a Git-connected Package using the Commit button in the top-right corner of the interface. This opens the Commit Modal, where you can commit changes, merge branches, and release a new Package version.
11+
12+
If the Package is not Git-connected, the Deploy button appears instead of Commit. Deploying applies changes immediately without version control.
13+
14+
15+
16+
17+
#### Deploy
18+
19+
<dd>
20+
21+
The Deploy section allows you to commit changes to the active Git branch. You can see Changes since the last deployment, such as updates to queries and JS modules.
22+
23+
- If there are uncommitted changes, they must be committed before merging or releasing.
24+
- You can provide a commit message to describe the update.
25+
- Clicking **Commit & Push** Changes synchronizes the latest modifications with the repository.
26+
- The **Discard & Pull** button discards all local changes and pulls the latest updates from the remote repository.
27+
28+
29+
</dd>
30+
31+
#### Merge
32+
33+
<dd>
34+
35+
The Merge section allows you to combine updates from a source branch into a target branch.
36+
Before merging, ensure that both branches have the latest committed changes and that there are no merge conflicts.
37+
38+
- Merging incorporates updates from feature or development branches before releasing.
39+
- If conflicts exist, Git prompts you to resolve them before completing the merge.
40+
- After merging, the target branch reflects the latest updates.
41+
42+
For more details, see [How to Resolve Merge Conflicts](/advanced-concepts/version-control-with-git/commit-and-push).
43+
44+
45+
46+
</dd>
47+
48+
#### Release
49+
50+
<dd>
51+
52+
The Release tab allows you to tag a version based on the latest commit in the repository. This feature is built on [Git tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging) and currently applies only to Packages. The latest commit is tagged with the selected version, and uncommitted changes are not included in the release.
53+
54+
Version tagging allows applications to reference a specific release instead of the latest changes. It follows semantic versioning, where each increment indicates the type of update.
55+
56+
- **Major (1.x.x → 2.0.0)**: Indicates breaking changes that require modifications in dependent applications. For example: Removing or renaming existing functions.
57+
58+
- **Minor (1.0.x → 1.1.0)**: Introduces new features while maintaining backward compatibility. For example: Adding a new method without modifying existing functionality.
59+
60+
- **Patch (1.0.0 → 1.0.1)**: Applies bug fixes or minor improvements that do not affect functionality. For example: Resolving an error in an existing function.
61+
62+
63+
</dd>
64+
65+
66+
## Using Package Versions in Applications
67+
68+
You can select a Package version from the **Libraries** section in the **Entity Explorer** by choosing from the available options. Only Packages currently used in the application are listed. If a Package or module is not used in the application, it will not appear in the selection menu.
69+
70+
- **For Git-connected Packages:** You can choose from a list of available Package versions that have been released. Each version corresponds to a tagged commit, allowing you to control which version is used in your application.
71+
72+
- **For Non-Git-connected Packages:** Version selection is not available, and the application always uses the latest Package version. Any updates to the Package are immediately applied without version control.
73+
74+
75+
76+
77+
78+

website/docs/packages/tutorial/js-module.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,13 @@ export default {
9292
</dd>
9393

9494

95+
5. **Publish** the JS module from top-right corner. This allows the changes to reflect on the app side.
9596

96-
5. **Publish** the JS Module.
97+
<dd>
98+
99+
If the package is git-connected, you also need to release a new version for the changes to be available. For more details, refer to [Package Version Control](/packages/reference/versioning).
100+
101+
</dd>
97102

98103
## Use JS module
99104

@@ -145,6 +150,8 @@ With this, you can format dates using the JS module in multiple places throughou
145150

146151
:::info
147152
When you update and publish a package, these modifications automatically apply in the edit mode of the app. However, the live (deployed) version of the app remains unchanged until you redeploy the app.
153+
154+
If the package is git-connected, it continues to use the previous version until it is changed directly while editing the app.
148155
:::
149156

150157
### See also

website/docs/packages/tutorial/query-module.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ You'll create a reusable query module using product inventory data and display t
2828
* ♻️ **Reusability:** Discover how to reuse the query module within applications
2929
:::
3030

31-
## Prerequisites
32-
Before you start, make sure you have the following:
33-
34-
* A self-hosted instance of Appsmith with a [paid subscription](https://www.appsmith.com/pricing). Refer to the [Appsmith installation guides](/getting-started/setup/installation-guides) for detailed instructions on setting up your Appsmith instance.
35-
* If you are new to Appsmith, see [Tutorial - Basics](/getting-started/tutorials/start-building).
36-
3731

3832
## Create query module
3933

@@ -126,7 +120,13 @@ SELECT * FROM public."product" LIMIT {{inputs.limit}} OFFSET {{inputs.offset}};
126120
11. **Run** the query to ensure it retrieves the data correctly.
127121

128122

129-
12. **Publish** the query module from top-right corner. This allows the changes to reflect on the app side.
123+
12. **Publish** the query module from top-right corner. This allows the changes to reflect on the app side.
124+
125+
<dd>
126+
127+
If the package is git-connected, you also need to release a new version for the changes to be available. For more details, refer to [Package Version Control](/packages/reference/versioning).
128+
129+
</dd>
130130

131131

132132

website/sidebars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,8 @@ const sidebars = {
764764
label: 'Reference',
765765
items: [
766766
'packages/reference/package',
767-
'packages/reference/query-module'
767+
'packages/reference/query-module',
768+
'packages/reference/versioning'
768769
],
769770
}
770771
]

0 commit comments

Comments
 (0)