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

@example seems to fail to parse whole snippet when using decorators #995

Open
andykais opened this issue Feb 27, 2025 · 0 comments
Open

Comments

@andykais
Copy link

I have the following class docstring: https://jsr.io/@torm/sqlite/1.6.0/drivers/sqlite.ts#L158

/**
  * Migrations are used to upgrade your database structure as you roll out new versions of code. These can be ran automatically, programatically. Torm currently only supports forward migrations. At the end of the day, this class essentially just wraps logic around version numbers and a function call with access to a database driver.
  * @example
  * ```ts
  * const migrations = new MigrationRegistry()
  *
  * @migrations.register()
  * class AddNewColumnMigration extends Migration {
  *   version = '1.1.0'
  *
  *   call() {
  *     this.driver.exec(`ALTER TABLE book ADD COLUMN genre TEXT`)
  *   }
  * }
  *
  * class BookORM extends Torm {}
  *
  * const db = new BookORM('books.db', {migrations})
  * db.init({auto_migrate: false}) // this will prevent torm from automatically running migrations upon startup
  * // this is the general workflow for migrating manually:
  * const current_db_version = db.schemas.version()
  * if (db.migrations.is_database_outdated()) {
  *   db.migrations.upgrade_database()
  * }
  *
  * ```
  */

but the generated example https://jsr.io/@torm/[email protected]/doc/~/Migration only shows the first line. If I had to guess, this probably has to do with the javascript decorator @migrations
Image

@github-project-automation github-project-automation bot moved this to Needs Triage in JSR Feb 27, 2025
@andykais andykais changed the title @example seems to fail to parse whole snippet @example seems to fail to parse whole snippet when using decorators Feb 27, 2025
@crowlKats crowlKats moved this from Needs Triage to Needs Plan in JSR Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Plan
Development

No branches or pull requests

1 participant