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

Fixing docs pertaining to TypeScript support #1275

Closed
wants to merge 2 commits into from
Closed

Fixing docs pertaining to TypeScript support #1275

wants to merge 2 commits into from

Conversation

RickvdP
Copy link

@RickvdP RickvdP commented Sep 23, 2021

Summary:

As I just started using Dynamoose I didn't quite get why the fancy TypeScript typings didn't work - until I realised dynamoose/dist/Item actually doesn't exist on the v2 branch.

I updated the docs to better reflect this, as this info (or any info pertaining the differences of v2 and v3 actually) was not clear in the docs.

Additionally there is currently no beta tag in npm, just an alpha one. Those terms seem to be used interchangeably without clear differentiation what Dynamoose users can expect of either types of releases. Alpha sounds a bit scary - but the docs actually promote usage, sounding a bit more like a beta to me. Avoiding the full semantics discussion, I changed the docs to what currently works, which is dynamoose@alpha 😃 .

Type (select 1):

  • Bug fix
  • Feature implementation
  • Documentation improvement
  • Testing improvement
  • Test added to report bug (GitHub issue #--- @---)
  • Something not listed here

Is this a breaking change? (select 1):

  • 🚨 YES 🚨
  • No
  • I'm not sure

Is this ready to be merged into Dynamoose? (select 1):

  • Yes
  • No

Are all the tests currently passing on this PR? (select 1):

  • Yes
  • No

Other:

  • I have read through and followed the Contributing Guidelines
  • I have searched through the GitHub pull requests to ensure this PR has not already been submitted
  • I have updated the Dynamoose documentation (if required) given the changes I made
  • I have added/updated the Dynamoose test cases (if required) given the changes I made
  • I have ensured the following commands are successful from the root of the project directory
    • npm test
    • npm run lint
  • I agree that all changes made in this pull request may be distributed and are made available in accordance with the Dynamoose license
  • All of my commits and commit messages are detailed, explain what changes were made, and are easy to follow and understand
  • I have filled out all fields above

@vercel
Copy link

vercel bot commented Sep 23, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/dynamoose/dynamoose/HwTz3zoBTrjuovSooTxE531hDJd6
✅ Preview: https://dynamoose-git-fork-rickvdp-patch-1-dynamoose.vercel.app

@fishcharlie
Copy link
Member

TypeScript support was added in v2.1.0 😃

@RickvdP
Copy link
Author

RickvdP commented Sep 23, 2021

Ah really... 😅 I couldn't seem to even find dynamoose/dist/Item in the module for <v3?

package.json

"dynamoose": "^2.8.2",
import { Item } from 'dynamoose/dist/Item';

class Something extends Item {}

Cannot find module 'dynamoose/dist/Item' or its corresponding type declarations.ts(2307)

Works fine on 3.0.0-alpha3, however!

Edit: Ah, got it. With my amazing git history skills it seems Document was renamed to Item in v3. The docs already point to Item in all examples though, while current published stable still relies on Document.

@fishcharlie
Copy link
Member

@RickvdP Take a look at https://github.com/dynamoose/dynamoose/blob/v3/PENDING_CHANGELOG.md. That is the pending changelog for v3.

@fishcharlie
Copy link
Member

@RickvdP If you see documentation that references Item that is published, please let me know. Of course v3 documentation should indicate Item, but v2 should not. I'm looking at the published latest stable release documenetation here and can see Document (which is correct):

https://dynamoosejs.com/guide/Document

@RickvdP
Copy link
Author

RickvdP commented Sep 23, 2021

@fishcharlie Allright, not sure how I got there but checking my history I've apparently been on the v3 docs all this time... Looking like a fool while trying to be a good open-source citizen 😁 The pre-release branch is still off on the main website though!

Any idea on when v3 becomes available as a stable release?

@fishcharlie
Copy link
Member

@RickvdP

Looking like a fool while trying to be a good open-source citizen 😁

Never! Contributions are always welcome and HIGHLY appreciated.

The pre-release branch is still off on the main website though

So that was written when a beta version did exist, and alpha did not. In the documentation I tried to use language like At times we will also have prerelease versions, and An example of this. To me, those things indicate that prerelease versions are likely to change, and that page is not the source of truth regarding that.

The README file is. So instead of updating the code, I'd suggest just adding a link to the README branch strategy (https://github.com/dynamoose/dynamoose#branch-strategy) to that page.

Additionally it might be a good idea to add a link to that Pending Changelog for the v3 branch in the README.

The reason why I'm against updating it, is that I don't want to set a precedent that the documentation will be updated whenever we switch between prerelease versions (or don't have any prerelease versions). That would require a lot of overhead, and unless someone wants to automate that process, I'm unwilling to do that work.

Any idea on when v3 becomes available as a stable release?

I currently have a local checkout with a bunch of merge conflicts. We have merge conflicts between master branch and v3, and that will likely show conflicts between #1219 and v3. #1269 was going to do that, but the PR became stale.

Then after that, #1219 needs to be finished, and merged.

Then, it's finishing the todo list on #1040 and getting more testers.

TL;DR. still have a LOT of work to do.

Any contributions are always welcome! I've tried to make it as transparent as possible where I'm at, what I've done, what still needs to be done, etc. If you do want to help, all I expect is that you communicate on those same issues and PRs, so that others (and myself) know what is already being worked on so that we don't duplicate work.


I am going to close this PR tho. The changes I'm requesting are pretty different from the original intent. I'd be happy to reopen if you believe I'm wrong or have arguments for something different tho.

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.

None yet

2 participants