这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Hajime-san
Copy link
Contributor

Changes

This PR adds support for releaseTimestamp in the JSR data source, as the JSR API recently added a package creation date field(createdAt) to its response.

Context

Please select one of the below:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

Comment on lines +20 to +29
...{
releaseTimestamp:
// In the JSR.io API, if a package has had any version published on or after 2025-09-18,
// the createdAt field will be returned for all versions of that package, including historical ones.
// If a package has not been published at all since this date,
// the createdAt field will be omitted entirely from the API response.
// Therefore, we can assume that it published no less than that date for older versions
// https://github.com/jsr-io/jsr/pull/1194#issuecomment-3522729482
val.createdAt ?? MaybeTimestamp.parse('2025-09-18T00:00:00.000Z'),
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc: @dsherret @crowlKats

% curl https://jsr.io/@luca/flag/meta.json | jq .
...
{
  "scope": "luca",
  "name": "flag",
  "latest": "1.0.1",
  "versions": {
    "1.0.1": {},
    "1.0.0": {}
  }
}
% curl https://jsr.io/@david/service-store/meta.json | jq .
...
{
  "scope": "david",
  "name": "service-store",
  "latest": "0.3.0",
  "versions": {
    "0.1.0": {
      "createdAt": "2025-04-06T01:02:36.669201Z"
    },
    "0.1.1": {
      "createdAt": "2025-04-06T01:16:28.337077Z"
    },
    "0.3.0": {
      "createdAt": "2025-10-12T00:15:36.183334Z"
    },
    "0.2.0": {
      "createdAt": "2025-04-07T01:08:08.575372Z"
    }
  }
}

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.

1 participant