Skip to content

Commit 023b39e

Browse files
fix: Removed unneeded './' at start of entry path and entry entryFile (#2352)
1 parent bce4008 commit 023b39e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/contentful--app-scripts/src/generate-function/clone.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ describe('Helper functions tests', () => {
6666
// The id should be the settings.name
6767
assert.strictEqual(entry.id, dummySettings.name);
6868
// The path is updated to always have a .js extension
69-
assert.strictEqual(entry.path, `./functions/${renameFile.replace('.ts', '.js')}`);
69+
assert.strictEqual(entry.path, `functions/${renameFile.replace('.ts', '.js')}`);
7070
// entryFile remains unchanged (uses the original renameFile)
71-
assert.strictEqual(entry.entryFile, `./functions/${renameFile}`);
71+
assert.strictEqual(entry.entryFile, `functions/${renameFile}`);
7272
});
7373
});
7474

packages/contentful--app-scripts/src/generate-function/clone.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ export async function touchupAppManifest(localPath: string, settings: GenerateFu
5353
const entry = appManifest["functions"][appManifest["functions"].length - 1];
5454
entry.id = settings.name;
5555
// the path always has a .js extension
56-
entry.path = `./functions/${renameFunctionFile.replace('.ts', '.js')}`;
57-
entry.entryFile = `./functions/${renameFunctionFile}`;
56+
entry.path = `functions/${renameFunctionFile.replace('.ts', '.js')}`;
57+
entry.entryFile = `functions/${renameFunctionFile}`;
5858
await fs.writeFileSync(`${localPath}/${CONTENTFUL_APP_MANIFEST}`, JSON.stringify(appManifest, null, 2));
5959
}
6060

0 commit comments

Comments
 (0)