Skip to content

Commit

Permalink
revert(rosetta): 'extract' does not translate samples in submodule RE…
Browse files Browse the repository at this point in the history
…ADMEs (#2729)

Reverts #2712

The mentioned commit breaks our cdk integ test since it depends on aws/aws-cdk#13670, which hasn't landed on the release branch yet. 

This will be reintroduced after we release CDK.
  • Loading branch information
iliapolo authored Mar 22, 2021
1 parent 6717118 commit d3cadb8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
12 changes: 0 additions & 12 deletions packages/jsii-rosetta/lib/jsii/assemblies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ export function allSnippetSources(
});
}

for (const [submoduleFqn, submodule] of Object.entries(
assembly.submodules ?? {},
)) {
if (submodule.readme) {
ret.push({
type: 'markdown',
markdown: submodule.readme.markdown,
where: removeSlashes(`${submoduleFqn}-README`),
});
}
}

if (assembly.types) {
Object.values(assembly.types).forEach((type) => {
emitDocs(type.docs, `${assembly.name}.${type.name}`);
Expand Down
27 changes: 0 additions & 27 deletions packages/jsii-rosetta/test/jsii/assemblies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,6 @@ test('Extract snippet from README', () => {
expect(snippets[0].visibleSource).toEqual('someExample();');
});

test('Extract snippet from submodule READMEs', () => {
const snippets = Array.from(
allTypeScriptSnippets([
{
assembly: fakeAssembly({
submodules: {
'my.submodule': {
readme: {
markdown: [
'Before the example.',
'```ts',
'someExample();',
'```',
'After the example.',
].join('\n'),
},
},
},
}),
directory: path.join(__dirname, 'fixtures'),
},
]),
);

expect(snippets[0].visibleSource).toEqual('someExample();');
});

test('Extract snippet from type docstring', () => {
const snippets = Array.from(
allTypeScriptSnippets([
Expand Down

0 comments on commit d3cadb8

Please sign in to comment.