Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#395 Use default require.extensions #396

Merged
merged 1 commit into from
Dec 23, 2019
Merged

#395 Use default require.extensions #396

merged 1 commit into from
Dec 23, 2019

Conversation

snuggs
Copy link
Contributor

@snuggs snuggs commented Sep 22, 2017

Fixes browserify/resolve#137 & Fixes #395 by using default require.extensions collection.

@snuggs snuggs changed the title #137 Use default require.extensions #395 Use default require.extensions Sep 22, 2017
bin/tape Outdated Show resolved Hide resolved
@ljharb
Copy link
Collaborator

ljharb commented Sep 22, 2017

Actually it just occurred to me why this isn't done. JSON files and binary .node files are part of require.extensions but would never be tests.

In other words, it'd be fine to make a tape command line runner option that allows you to set the extensions list (which is passed to resolve), but this absolutely couldn't be default behavior.

@snuggs
Copy link
Contributor Author

snuggs commented Sep 22, 2017

In other words, it'd be fine to make a tape command line runner option that allows you to set the extensions list (which is passed to resolve), but this absolutely couldn't be default behavior. @ljharb

I concur 💯 How can we move forward in the direction of --extensions ? This way we can get the resolve issue browserify/resolve#137 closed as per a recommendation in browserify/resolve#137 (comment)

@ljharb
Copy link
Collaborator

ljharb commented Sep 22, 2017

Let's leave this open for the time being; and then would you be willing to open a new PR that adds the --extensions option to tape?

@snuggs
Copy link
Contributor Author

snuggs commented Sep 22, 2017

Let's leave this open for the time being; and then would you be willing to open a new PR that adds the --extensions option to tape? @ljharb

It would be my pleasure to champion the PR. I will address this weekend. Thanks for the great insight and for such an awesome library! 🎉

@ljharb ljharb added the semver-major: breaking change Any breaking changes label Jan 28, 2019
@ljharb
Copy link
Collaborator

ljharb commented Dec 20, 2019

@snuggs any interest in the --extensions PR?

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that require.extensions would only apply to --require, ie, explicit paths the user has provided, upon reflection this seems fine as-is (as a breaking change still, which will be in v5)

@ljharb ljharb merged commit 67ba418 into tape-testing:master Dec 23, 2019
ljharb added a commit that referenced this pull request Jan 1, 2020
Changes since v5.0.0-next.0:

 - [Breaking] fail any assertion after `.end()` is called (#489(
 - [Breaking] tests with no callback are failed TODO tests (#69)
 - [Breaking] equality functions: throw when < 2 arguments are provided
 - [Breaking] add "exports" to restrict public API
 - [Breaking] `throws`: bring into line with node’s `assert.throws`
 - [Breaking] use default `require.extensions` collection instead of the magic Array `['.js']` (#396)
 - [Fix] error stack file path can contain parens/spaces
 - [Refactor] make everything strict mode
 - [Refactor] Avoid setting message property on primitives; use strict mode to catch this (#490)
 - [Refactor] generalize error message from calling `.end` more than once
 - [Dev Deps] update `eslint`
 - [Tests] improve some failure output by adding messages
 - [Tests] handle stack trace variation in node <= 0.8
 - [Tests] ensure bin/tape is linted
 - [Tests] Fail a test if its callback returns a promise that rejects (#441)
 - [eslint] fix remaining undeclared variables (#488)
 - [eslint] Fix leaking variable in tests
 - [eslint] fix object key spacing

Changes since v4.12.1:

 - [Breaking] `error` should not emit `expected`/`actual` diags (#455)
 - [Breaking] support passing in an async function for the test callback (#472)
 - [Breaking] update `deep-equal` to v2
 - [Deps] update `resolve`
 - [meta] change dep semver prefix from ~ to ^
ljharb added a commit that referenced this pull request Jan 19, 2020
Changes since v5.0.0-next.3:
 - [Fix] `.catch` is a syntax error in older browsers
 - [Refactor] remove unused code
 - [Deps] update `resolve`

Changes since v4.13.0:

 - [Breaking] update `deep-equal` to v2
 - [Breaking] fail any assertion after `.end()` is called (#489)
 - [Breaking] `error` should not emit `expected`/`actual` diags (#455)
 - [Breaking] support passing in an async function for the test callback (#472)
 - [Breaking] tests with no callback are failed TODO tests (#69)
 - [Breaking] equality functions: throw when < 2 arguments are provided
 - [Breaking] add "exports" to restrict public API
 - [Breaking] `throws`: bring into line with node’s `assert.throws`
 - [Breaking] use default `require.extensions` collection instead of the magic Array `['.js']` (#396)
 - [meta] change dep semver prefix from ~ to ^
ljharb added a commit that referenced this pull request Mar 3, 2020
Changes since v5.0.0-next.4:
 - [Breaking] only `looseEqual`/`deepEqual, and their inverses, are now non-strict.
 - [Breaking] make equality functions consistent:
 - [Breaking] `equal`: use `==`, not `===`, to match `assert.equal`
 - [Breaking] `strictEqual`: bring `-0`/`0`, and `NaN` into line with `assert`
 - [patch] Print name of test that didnt end (#498)
 - [Refactor] remove unused code
 - [Deps] update `resolve`

Changes since v4.13.2:

 - [Breaking] only `looseEqual`/`deepEqual, and their inverses, are now non-strict.
 - [Breaking] make equality functions consistent:
 - [Breaking] `equal`: use `==`, not `===`, to match `assert.equal`
 - [Breaking] `strictEqual`: bring `-0`/`0`, and `NaN` into line with `assert`
 - [Breaking] update `deep-equal` to v2
 - [Breaking] fail any assertion after `.end()` is called (#489)
 - [Breaking] `error` should not emit `expected`/`actual` diags (#455)
 - [Breaking] support passing in an async function for the test callback (#472)
 - [Breaking] tests with no callback are failed TODO tests (#69)
 - [Breaking] equality functions: throw when < 2 arguments are provided
 - [Breaking] add "exports" to restrict public API
 - [Breaking] `throws`: bring into line with node’s `assert.throws`
 - [Breaking] use default `require.extensions` collection instead of the magic Array `['.js']` (#396)
 - [meta] change dep semver prefix from ~ to ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major: breaking change Any breaking changes
Projects
None yet
2 participants