Skip to content
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

Clean up document #218

Merged
merged 10 commits into from
Jul 8, 2021
Merged

Clean up document #218

merged 10 commits into from
Jul 8, 2021

Conversation

mojosoeun
Copy link
Member

@mojosoeun mojosoeun commented Jun 27, 2021

What this PR does / why we need it?

Clean up document

Any background context you want to provide?

This is a process for pruning d.ts file and then generating cleaned up document files

Screen Shot 2021-07-03 at 3 40 45 PM

I referenced firebase-js-sdk https://github.com/firebase/firebase-js-sdk/blob/master/repo-scripts/prune-dts/prune-dts.ts
and https://github.com/microsoft/rushstack/blob/master/build-tests/api-extractor-scenarios/src/runScenarios.ts

Screen Shot 2021-07-04 at 4 19 59 PM

What are the relevant tickets?

Fixes #181

Checklist

  • Added relevant tests or not required
  • Didn't break anything

@codecov
Copy link

codecov bot commented Jun 27, 2021

Codecov Report

Merging #218 (0e2a68d) into main (80cdc8f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage   79.68%   79.68%           
=======================================
  Files          49       49           
  Lines        2820     2820           
  Branches      469      469           
=======================================
  Hits         2247     2247           
  Misses        404      404           
  Partials      169      169           
Impacted Files Coverage Δ
src/core/client.ts 75.90% <ø> (ø)
src/document/document.ts 82.82% <ø> (ø)
src/document/json/array.ts 83.33% <ø> (ø)
src/document/json/element.ts 88.23% <ø> (ø)
src/document/json/object.ts 82.00% <ø> (ø)
src/document/json/plain_text.ts 83.67% <ø> (ø)
src/document/json/rich_text.ts 70.10% <ø> (ø)
src/document/time/ticket.ts 82.85% <ø> (ø)
src/api/converter.ts 81.81% <100.00%> (ø)
src/document/json/rga_tree_list.ts 85.60% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80cdc8f...0e2a68d. Read the comment docs.

@mojosoeun mojosoeun changed the title Clean up and document interfaces exposed to users Clean up document Jun 27, 2021
@mojosoeun mojosoeun force-pushed the soeunlee/181/cleanup-document branch from 7c1cb23 to ad7eea4 Compare July 3, 2021 05:24
tsdoc.json Show resolved Hide resolved
@mojosoeun mojosoeun marked this pull request as ready for review July 3, 2021 06:48
@mojosoeun mojosoeun requested a review from a team July 3, 2021 06:49
Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution. We can now manipulate documents in more detail.

I left a minor request.

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@hackerwins hackerwins removed their assignment Jul 5, 2021
Copy link
Member

@dc7303 dc7303 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the detailed explanation, it was easier to review. 😄
I was worried about using the firebase-js-sdk code, so I left a comment, so please check it.

script/prune-dts.ts Outdated Show resolved Hide resolved
"start": "webpack-dev-server --watch --config webpack.dev.config.js",
"test": "karma start karma.conf.js --single-run",
"test:yorkie.dev": "karma start karma.conf.js --single-run --testRPCAddr=https://yorkie.dev/api",
"test:watch": "karma start karma.conf.js",
"lint": "eslint . --fix --max-warnings=0 --ext .ts",
"prepare": "npm run build",
Copy link
Member

@hackerwins hackerwins Jul 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we removed prepare? Previously, if the user installs yorkie-js-sdk with npm install, prepare is preparing bundles(yorkie-js-sdk.js, yorkie-js-sdk.d.ts).

https://docs.npmjs.com/cli/v7/using-npm/scripts#life-cycle-scripts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a look this script https://github.com/yorkie-team/yorkie-js-sdk/blob/main/.github/workflows/npm-publish.yml
I think after we run npm run build, I think yorkie-js-sdk.js, yorkie-js-sdk.d.ts are generated. isn't it? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script was previously added when removing the /dist folder from the source code. I remember that without the script there was no dist file after npm install from the specific branch directly(e.g. npm install https://github.com/yorkie-team/yorkie-js-sdk#main). 🤔

https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see thank you for letting me know!

Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@mojosoeun
Copy link
Member Author

@hackerwins In the generated docs, could you let me know the part which we should remove? For example, constructor, symbol.iterators(), etc.. After we merge this pr, I'm going to create a new pr for this!

@hackerwins hackerwins merged commit a3438bf into main Jul 8, 2021
@hackerwins hackerwins deleted the soeunlee/181/cleanup-document branch July 8, 2021 00:42
parkeunae pushed a commit to parkeunae/yorkie-js-sdk that referenced this pull request Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up and document interfaces exposed to users
4 participants