Skip to content

Conversation

@seastian
Copy link
Member

kl0tl added 30 commits April 22, 2020 23:25
ES modules are already parsed in strict mode.
Node.js loads JavaScript files with a .js extension as CommonJS modules unless they're within a directory with a `"type": "module"` package.json, in which case it loads them as ES modules.
Node.js ignores the package.json file of the output directory otherwise and loads .js files as CommonJS modules.
Node.js allows ES modules to import CommonJS modules by providing the module.exports object as their default export and named exports for statically discoverable properties of the module.exports object.

This has an unpleasant consequence for foreign imports: CommonJS exports named `default` are only available as the default property of their default export so a `default :: String` identifier imported from a CommonJS foreign module would actually have type `{ default :: String }`!
The require function and the exports object are not available in ES modules on Node.js.
jborkowski and others added 29 commits December 2, 2024 10:17
f58f5f0 'ExternsDiff: normalize type'
* Upgrade CI

* Back to the previous haskell image

* Use new spavo

* Upgrade node to latest supported lts

* Upgrade to GHC 9.6.6

- Switch from `ansi-wl-pprint` to `prettyprinter`
- Add several `extra-deps`

* Upgrade CI to use GHC 9.6.6

* Upgrade GitHub Actions

* CI: Upgrade to macos-15, specify exact version of Ubuntu

* CI: Upgrade Stack from 2.15.1 to 3.3.1

* CI: Include stack.yaml.lock file and use it for the cache's file hashes

* CI: Also include `purescript.cabal` in cache's file hashes

* Update documentation

* CI: Remove obsolete directory ownership changes

* CI: Add safe.directory configuration for Ubuntu 24.04

* CI: Fix container ownership issues in workflow configuration

* CI: Simplify container configuration and fix working directory ownership for Ubuntu 24.04

* Update version ranges of dependencies

* Update Cabal version range and allow newer dependencies in stack configuration

* Update Cabal version to 3.10.3.0 in stack configuration

* Enable allow-newer option in stack configuration

* Update dependency versions in purescript.cabal and stack.yaml

* Update weeder installation and streamline CI workflow

* Fix wrapping of run commands

* Remove obsolete quotes

* Add missing `--name` flag to `spago init`

* Add Adrian Sieber to contributors

* Add changelog entry for GHC upgrade

* Use new weeder.toml config file format

* Install missing `jq` dependency

* CI: Use `-y` flag for all `apt-get install` runs

* Vendor pattern-arrows

* Run haskell container on ubuntu-latest, use macos-13 and macos-14

* CI: Use strings instead of arrays for matrix.os

* Fix Hlint warnings

* Add arm64 Linux to testing matrix

* Correctly match only self-hosted Linux runner

* Don't use self-hosted runners anymore, as GitHub runners cover all cases

* Mention glibc bump from `2.28` to `2.31` in changelog

* Upgrade to latest version of aeson-better-errors from Hackage

* Remove obsolete `allow-newer` section, delete .stack-work on make clean

* Re-add `allow-newer` block, improve dependency bounds

* Downgrade haskeline to 0.8.2 to avoid libtinfo issues

* Update aeson-better-errors and use cheapskate fork

* Fix build errors in stack

These errors are present in the Cabal build and seem to be caused
by Cabal and Stack using different versions of mtl, with 2.3.x notably
changing re-exports for certain modules.

---------

Co-authored-by: Fabrizio Ferrai <fabrizio.ferrai@gmail.com>
Co-authored-by: Justin Garcia <purefunctor@gmail.com>
Fixes a bug where type synonym changes are incorrectly computed when diffing externs.

See https://github.com/zyla/purs-recompilation-repro for a reproducer of the bug.

Bug explanation: Externs files can have multiple entries with the same Ref, but the code in ExternsDiff assumed uniqueness. This led to buggy dependency graph construction.

The fix is to merge duplicate entries.
@seastian seastian merged commit 64300ad into master May 28, 2025
1 of 7 checks passed
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.

9 participants