Skip to content

Complete CommonJS to ESM migration for remaining scripts #7226

@afarber

Description

@afarber

Summary

Following the Cucumber-js v12 upgrade in #7221, there are still 6 script files using .cjs extension
that can be converted to native ESM .js files.

Files to Convert

  • scripts/md5sum.cjsscripts/md5sum.js
  • scripts/osm2cucumber.cjsscripts/osm2cucumber.js
  • scripts/osrm-runner.cjsscripts/osrm-runner.js
  • scripts/poly2req.cjsscripts/poly2req.js
  • scripts/timer.cjsscripts/timer.js
  • scripts/validate_changelog.cjsscripts/validate_changelog.js

Conversion Requirements

  1. Change file extensions from .cjs to .js
  2. Update imports:
    • var fs = require('fs')import fs from 'fs'
    • const crypto = require('crypto')import crypto from 'crypto'
    • var parseString = require('xml2js').parseStringimport { parseString } from 'xml2js'
    • etc.
  3. Update any references in other files (Makefiles, documentation, shell scripts, etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions