Deprecate `td.function` in favor of `td.func`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, rollup, webpack
- 領域
- api, build-system, documentation
調査の方向性
Start by tracing the current package exports and build setup, then compare how webpack, Rollup, and Browserify handle the proposed ES-module and CommonJS shapes. Done means preserving the intended top-level distribution API and tree shaking, documenting td.func(), and deciding when td.function should be removed in a major release.
索引モデルが issue の本文から書いたものです。
説明
Terrible luck to discover this after releasing 2.0.0, but subsequent improvements to the build have made me realize that the cute way we do this:
module.exports = { function: require('./function') /*...*/ }
Just won't fly in ES module-land, where something like this:
export { function }
Will blow up because it's a reserved word. (import {function} from 'testdouble' also blows up)
We can do:
export default {
function: tdFunction
}
But then any module/bundler like webpack/rollup/browserify is going to have that default tacked onto it, which means that our distribution will be td.default.object or whatever.
I hope we can find some workaround to use ES exports exclusively and then solve this with build cleverness using one of the bundlers, but even if we do manage, having a top-level API that's a reserved word is probably not a great long-term play.
Goals:
- hack up some short-term win with a bundler that'll let us still get tree shaking while using a CJS export at the top level or a way to modify the bundled content to
td = td.defaultdynamically. - documentation change from
td.function()totd.func() - figure out how soon we want to think about dropping
td.functionwith another major bump.
- 主要言語
- JavaScript
- スター
- 1.4k
- フォーク
- 141
- 平均マージ
- 20分
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testdouble/testdouble.js のほかの issue
-
Feature request: `td.func().reset()` (reset spy/stub state)対応中かも @MatrixNeoKozak が 6 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
testdouble/testdouble.js#529 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
testdouble/testdouble.js#296 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
testdouble/testdouble.js#281 · コメント 5 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
testdouble/testdouble.js#276 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
testdouble/testdouble.js#275 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
testdouble/testdouble.js の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
HarperFast/harper#3299 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
osmlab/name-suggestion-index#12992 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
open-government-design-system/ogds-elements#199 ·
メンテナーはふだん 1 日以内に返信
-
area:plugin type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Document annotations cannot anchor visible code after a shorter or different fenced-code markerオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
paperclipai/paperclip#16898 ·
メンテナーはふだん 1 日以内に返信