Skip to content

fix(time): restore stream subpath entrypoints#1003

Open
shriram-svg wants to merge 1 commit into
cyclejs:masterfrom
shriram-svg:fix-issue-672-time-subpath-entrypoints
Open

fix(time): restore stream subpath entrypoints#1003
shriram-svg wants to merge 1 commit into
cyclejs:masterfrom
shriram-svg:fix-issue-672-time-subpath-entrypoints

Conversation

@shriram-svg
Copy link
Copy Markdown

Fixes #672.

Summary

  • Generate the @cycle/time/rxjs and @cycle/time/most root entrypoint shims during the package build.
  • Include the generated JS and declaration shims in the published package file list.
  • Point the root shims at the compiled CommonJS files instead of unpublished src files.

Verification

  • npx --yes pnpm@7.33.7 install --frozen-lockfile
  • npx --yes pnpm@7.33.7 --filter @cycle/run run build
  • npx --yes pnpm@7.33.7 --filter @cycle/dom run build
  • npx --yes pnpm@7.33.7 --filter @cycle/time run build
  • node -e "const rx = require('./time/rxjs'); const most = require('./time/most'); if (typeof rx.mockTimeSource !== 'function') throw new Error('missing rxjs mockTimeSource'); if (typeof rx.timeDriver !== 'function') throw new Error('missing rxjs timeDriver'); if (typeof most.mockTimeSource !== 'function') throw new Error('missing most mockTimeSource'); if (typeof most.timeDriver !== 'function') throw new Error('missing most timeDriver'); console.log('package-path subpath shims ok');"
  • npm pack --dry-run --json | node -e "...assert required files are present..."
  • Extracted the packed tarball and required package/rxjs and package/most
  • npx --yes pnpm@7.33.7 --filter @cycle/time run lint
  • ./node_modules/.bin/prettier --list-different time/.scripts/make-entrypoints.js time/package.json
  • git diff --check
  • npx --yes pnpm@7.33.7 --filter @cycle/time run test

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.

@cycle/time 0.9.1 Cannot find module './src/mock-time-source' from 'rxjs.js'

2 participants