Skip to content

Commit 74ed3eb

Browse files
authored
feat: add filepath to esm index.ts file (#1900)
* feat: add filepath to esm index.ts file
1 parent 7324804 commit 74ed3eb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

synthtool/gcp/templates/node_esm_mono_repo_split_library/index.ts.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// ** https://github.com/googleapis/synthtool **
1717
// ** All changes to this file may be overwritten. **
1818

19-
{% for version in versions %}import * as {{ version }} from './{{ version}}.js';{{ "\n" }}{% endfor %}
19+
{% for version in versions %}import * as {{ version }} from './{{ version}}/index.js';{{ "\n" }}{% endfor %}
2020
{% for client in clients %}const {{ client }} = {{ default_version }}.{{ client }};
2121
type {{ client }} = {{ default_version }}.{{ client }};{{ "\n" }}{% endfor %}
2222
export {{ "{" }}{{ versions|join(', ')}}, {{ clients|join(', ')}}{{ "}" }};

tests/fixtures/node_templates/index_esm_samples/esm/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
// ** https://github.com/googleapis/synthtool **
1717
// ** All changes to this file may be overwritten. **
1818

19-
import * as v1 from './v1.js';
20-
import * as v1beta1 from './v1beta1.js';
19+
import * as v1 from './v1/index.js';
20+
import * as v1beta1 from './v1beta1/index.js';
2121

2222
const TextToSpeechClient = v1.TextToSpeechClient;
2323
type TextToSpeechClient = v1.TextToSpeechClient;

tests/fixtures/node_templates/index_esm_samples/sample_index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
// ** https://github.com/googleapis/synthtool **
1717
// ** All changes to this file may be overwritten. **
1818

19-
import * as v1 from './v1.js';
20-
import * as v1beta1 from './v1beta1.js';
19+
import * as v1 from './v1/index.js';
20+
import * as v1beta1 from './v1beta1/index.js';
2121

2222
const TextToSpeechClient = v1.TextToSpeechClient;
2323
type TextToSpeechClient = v1.TextToSpeechClient;

tests/fixtures/nodejs_mono_repo_esm/packages/dlp/esm/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// ** https://github.com/googleapis/synthtool **
1717
// ** All changes to this file may be overwritten. **
1818

19-
import * as v2 from './v2.js';
19+
import * as v2 from './v2/index.js';
2020

2121
const DlpServiceClient = v2.DlpServiceClient;
2222
type DlpServiceClient = v2.DlpServiceClient;

0 commit comments

Comments
 (0)