Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Testing and contribution checklist for v0.1 #15

Open
63 tasks
milesj opened this issue Aug 29, 2023 · 0 comments
Open
63 tasks

Testing and contribution checklist for v0.1 #15

milesj opened this issue Aug 29, 2023 · 0 comments

Comments

@milesj
Copy link
Collaborator

milesj commented Aug 29, 2023

Hey everyone 👋

If you're excited about espresso like we are, we'd appreciate it if you'd help us test the current implementation by running through this checklist. If you encounter any issues, please report a bug, or ping us on Discord!

Furthermore, if there are other checks not listed here, feel free to add them, test them, and reply to this issue!

Blockers

A few features that currently do not work, so please avoid testing them:

  • TypeScript React/JSX support. Since we don't have node_modules currently, the react and @types/react packages are not resolvable, and React statements do not work.

    However, this can be temporarily bypassed by using "jsx": "preserve" and manually defining JSX.IntrinsicElements. This is a lot of work though.

     namespace JSX {
     	export interface IntrinsicElements {
     		div: {};
     		// ...
     	}
     }

    Or you could use npm temporarily to create the node_modules folder for @types usage.

Installing espm

  • Ran the installer script from the latest GitHub release
  • Created the ~/.espresso directory in my home directory
  • Added the espm binary to .espresso/bin and to PATH
  • Can execute the espm binary

espm init command

  • Command runs
  • Can skip prompts with --yes
  • Can customize output destination with --to
  • Can create a single package workspace / polyrepo
    • Refer to espm new for additional checks
  • Can create multiple package workspace / monorepo
    • Errors if destination is already a package or workspace
    • Can customize globs via prompts
    • Creates a [workspace] based esp.toml with populated values
    • Creates espm.lock (temporary)

espm new command

  • Command runs
  • Errors if destination is already a package
  • Can customize output destination with --to
  • Can customize name with --name
  • Can customize description with --description
  • Can customize keywords with --keyword
  • Can skip prompts with --yes
  • Creates a [package] based esp.toml with populated values
  • Creates src/index.ts and README.md

espm build command

  • Command runs
  • JavaScript
    • Transforms all JS/TS files, mirroring source structure
    • Writes files to the .espm/<target> output directory
    • Writes files with an .mjs extension
    • Rewrites import and export statements within files to have a trailing .mjs extension
    • Compiles for each target using --target
      • es2015
      • es2016
      • es2017
      • es2018
      • es2019
      • es2020
      • es2021
      • es2022
    • Can enable legacy decorators with build.decorators = "legacy"
    • CommonJS
      • Errors for CJS syntax (require, __dirname, etc)
      • Errors for .cjs and .cts files
  • TypeScript
    • Automatically generates declaration files if a TS file was detected in src
    • Creates a .espm/tsconfig.<target>.json file
    • Can customize compiler options and tsconfig with a tsconfig.espm.json file
      • Re-maps all path related compiler options correctly
    • Renames all .d.ts to .d.mts in the output directory
    • Generates for each target using tsc
      • es2015
      • es2016
      • es2017
      • es2018
      • es2019
      • es2020
      • es2021
      • es2022
    • Downloads the latest tsc version to ~/.espresso/packages
    • Supports project references and --build
    • Can enable legacy decorators with build.decorators = "legacy"
  • Assets
    • Copies assets to .espm/<target> output directory, mirroring source structure
    • Supports all asset types: images, audio, video, icons, etc
    • Can exclude assets from being copied with build.exclude setting
    • Optimizes .png files
      • Can disable optimization with build.optimize-png = false
      • Can customize optimization level with build.optimize-png = <level>
  • Other
    • Copies readmes, changelogs, and license to output directory
@milesj milesj pinned this issue Aug 29, 2023
@milesj milesj changed the title WIP: Testing and contribution checklist Testing and contribution checklist for v0.1 Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant