Skip to content

Conversation

socram8888
Copy link

As a previous step to #883, this severely improves version sorting and updates the rawDate on the parent element. Previous sorting (https://api.specref.org/bibrefs?refs=ECMASCRIPT):

{
  "ECMASCRIPT": {
    "title": "ECMAScript Language Specification",
    "href": "https://tc39.es/ecma262/multipage/",
    "publisher": "Ecma International",
    "versions": [
      "ECMASCRIPT-9.0",
      "ECMASCRIPT-8.0",
      "ECMASCRIPT-7.0",
      "ECMASCRIPT-60",
      "ECMASCRIPT-6.0",
      "ECMASCRIPT-51",
      "ECMASCRIPT-5.1",
      "ECMASCRIPT-2025",
      "ECMASCRIPT-2024",
      "ECMASCRIPT-2023",
      "ECMASCRIPT-2022",
      "ECMASCRIPT-2021",
      "ECMASCRIPT-2020",
      "ECMASCRIPT-2019",
      "ECMASCRIPT-2018",
      "ECMASCRIPT-2017",
      "ECMASCRIPT-2016",
      "ECMASCRIPT-2015",
      "ECMASCRIPT-16.0",
      "ECMASCRIPT-15.0",
      "ECMASCRIPT-14.0",
      "ECMASCRIPT-13.0",
      "ECMASCRIPT-12.0",
      "ECMASCRIPT-11.0",
      "ECMASCRIPT-10.0"
    ],
    "repository": "https://github.com/tc39/ecma262",
    "id": "ECMASCRIPT"
  }
}

New sorting:

{
  "ECMASCRIPT": {
    "title": "ECMAScript Language Specification",
    "href": "https://tc39.es/ecma262/multipage/",
    "publisher": "Ecma International",
    "versions": [
      "ECMASCRIPT-2025",
      "ECMASCRIPT-2024",
      "ECMASCRIPT-2023",
      "ECMASCRIPT-2022",
      "ECMASCRIPT-2021",
      "ECMASCRIPT-2020",
      "ECMASCRIPT-2019",
      "ECMASCRIPT-2018",
      "ECMASCRIPT-2017",
      "ECMASCRIPT-2016",
      "ECMASCRIPT-2015",
      "ECMASCRIPT-60",
      "ECMASCRIPT-51",
      "ECMASCRIPT-16.0",
      "ECMASCRIPT-15.0",
      "ECMASCRIPT-14.0",
      "ECMASCRIPT-13.0",
      "ECMASCRIPT-12.0",
      "ECMASCRIPT-11.0",
      "ECMASCRIPT-10.0",
      "ECMASCRIPT-9.0",
      "ECMASCRIPT-8.0",
      "ECMASCRIPT-7.0",
      "ECMASCRIPT-6.0",
      "ECMASCRIPT-5.1"
    ],
    "repository": "https://github.com/tc39/ecma262",
    "id": "ECMASCRIPT"
  }
}

An old, redundant and buggy unused version has been also dropped for cleanup.

A new function has been added that properly handles semantic and
dated versions.

Versioned entries also now inherit the date from the last version.
This function was not used, and now the latest version always comes
first in the version array.
@tobie
Copy link
Owner

tobie commented Sep 26, 2025

Thanks for this PR. Could you please explain what problem it is trying to solve?

@socram8888
Copy link
Author

#883 (comment) this

@tobie
Copy link
Owner

tobie commented Sep 26, 2025

Got it. Could we just focus on finding the newest date in that case rather than sorting the sub references?

@socram8888
Copy link
Author

socram8888 commented Sep 26, 2025 via email

@tobie
Copy link
Owner

tobie commented Sep 26, 2025

Yeah. I believe the sorting was to avoid generating diffs.

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.

2 participants