Skip to content

Update in package.json structure and Language Customization Feature #541

Open

Description

@suouzuki

Package.json Structure Update

The current structure specified in the package.json file of chrono-node includes a configuration that seems to be causing confusion and potential issues.

"exports": {
  ".": {
    "require": "./dist/cjs/index.js",
    "import": "./dist/esm/index.js"
  },
  "./*": {
    "require": "./dist/cjs/locales/*/index.js",
    "import": "./dist/esm/locales/*/index.js"
  },
  "./*/*": {
    "require": "./dist/cjs/locales/*/*/index.js",
    "import": "./dist/esm/locales/*/*/index.js"
  }
}

The specific entry "./*/*" results in unexpected behavior when attempting to access files such as "/src/locales/en/refiners". For instance, when trying to access "chrome-node/en/refiners", the system attempts to find an "index.js" within "refiners" which might not exist, causing issues in accessing the intended files.

Language Customization Feature

In addition to resolving the package.json structure issue, there's a request to introduce language customization capabilities within chrono-node. Enabling users to access files like "common", "utils", and other configuration-related files could greatly enhance the customization process.

Moreover, providing access to language-specific files directly, such as "/src/locales/en/refiners/ENMergeDateRangeRefiner", would empower users to modify or improve existing.

Desired Changes

  1. Package.json: Revisit and potentially modify the structure to ensure seamless file access without relying on the presence of "index.js" within certain directories.
  2. Language Customization: Enable access to essential configuration files and direct access to language-specific files for customization purposes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions