Skip to content

Cherry release - hotfix #770

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

Merged
merged 7 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Enabling display of Version Number for Remote Components
  • Loading branch information
FalkWolsky committed Mar 24, 2024
commit 2b68d59e51bda5a4ea2c65de06af833fd1cf21d7
1 change: 1 addition & 0 deletions client/packages/lowcoder/src/components/CompName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const CompName = (props: Iprops) => {

const items: EditPopoverItemType[] = [];

// Falk: TODO - Implement upgrade for individual Version functionality
const handleUpgrade = async () => {
if (upgrading) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ import {
async function npmLoader(
remoteInfo: RemoteCompInfo
): Promise<CompConstructor | null> {
const { packageName, packageVersion = "latest", compName } = remoteInfo;

console.log("remoteInfo: ", remoteInfo);

// Falk: removed "packageVersion = "latest" as default value fir packageVersion - to ensure no automatic version jumping.

const { packageName, packageVersion, compName } = remoteInfo;
const entry = `${NPM_PLUGIN_ASSETS_BASE_URL}/${packageName}@${packageVersion}/index.js`;
// const entry = `../../../../../public/package/index.js`;
// console.log("Entry", entry);
try {
const module = await import(/* webpackIgnore: true */ entry);
// console.log("Entry 1", module);
const comp = module.default?.[compName];
if (!comp) {
throw new Error(trans("npm.compNotFound", { compName }));
Expand Down