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

chore(deps): update dependency ts-node to v10 #712

Closed

Conversation

renovate-bot
Copy link
Contributor

@renovate-bot renovate-bot commented Oct 22, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ts-node (source) 9.1.1 -> 10.4.0 age adoption passing confidence

Release Notes

TypeStrong/ts-node

v10.4.0

Compare Source

Added

  • Adds support for targets "es2020" and "es2021" to swc transpiler (#​1521)
  • Adds automatic target downgrade when using older versions of swc (#​1521)
    • If tsconfig specifies es2020, but your version of swc only supports up to es2019, ts-node will automatically switch to es2019 instead of throwing an error

Changed

Fixed

https://github.com/TypeStrong/ts-node/milestone/8

v10.3.1

Compare Source

Fixed

https://github.com/TypeStrong/ts-node/milestone/7

v10.3.0

Compare Source

Questions about this release? Ask in the official discussion thread: #​1507

Added

  • Declare types for node builtin modules within REPL so you do not need to import them (#​1424, #​1500)
    • Node REPL exposes builtin modules as globals; typechecker now understands this
    • Typechecking should no longer raise errors when using builtins without first importing
    • For example: util.promisify(setTimeout)(1000) or fs.readFileSync('example.txt')
  • Add createEsmHooks() function to create ESM loader hooks (API docs) (#​1439) @​nonara
    • Can be used to compose our loader hooks with another loader or additional logic
  • register() accepts a ts-node Service (API docs) (#​1474)
    • register(options) is still supported; no breaking changes
  • Add support for Node.js's new loader hooks API (#​1372, #​1457, #​1007) @​jonaskello
    • Node.js has changed their loader hooks API
    • ts-node is compatible with all node versions, detects your node version and exposes the correct hooks API
    • Node's new API currently only available in node v17 nightly builds
    • Node will eventually backport the changes to node 16, and may also be backport to 14 and 12
  • Add --emit to --help output (#​1400, #​1484) @​markbradley27

Changed

  • When ts-node is registered and other libraries require('source-map-support'), they will be redirected to @cspotcode/source-map-support
    • See complete description in Fixed section below

Fixed

  • Fix #​1440, #​1441, #​1438, #​1495: Incorrect stack traces when third-party libraries use source-map-support instead of @cspotcode/source-map-support (#​1440, #​1441, #​1438, #​1495, cspotcode/node-source-map-support#​23, #​1496, #​1497) @​ejose19
    • When ts-node is registered and other libraries require('source-map-support'), they will be redirected to @cspotcode/source-map-support
    • ts-node uses @cspotcode/source-map-support for the fixes and enhancements listed here: @cspotcode/source-map-support changelog
    • To ensure correct stack traces, all libraries must share a compatible sourcemap support implementation
  • Fix #​1363: REPL may erroneously combine previous input with next input, eval both as a single statement (#​1363, #​1480) @​TheUnlocked
    • For example, entering 100 on first line and * 2 on second line would erronously be interpreted as 100 * 2
    • REPL now ensures both lines are separate statements, both when typechecking and when evaluating
  • Fix #​1488: Node may log "circular dependency" warning when using allowJs (#​1488, #​1489)
  • Fix #​1301: Filter empty strings from TS_NODE_IGNORE and TS_NODE_IGNORE_DIAGNOSTICS; treat empty environment variable as empty array (#​1301, #​1483) @​ValeriaVG
    • TS_NODE_IGNORE= ts-node ./example.ts will disable default ignore rules; will compile files in ./node_modules

Docs

  • Update VSCode debug configuration (Docs) (#​1466)
  • Update ESM-related messaging to clarify that experimental status is due to Node.js, not ts-node (#​1455)
  • Refer to ts-node consistently (#​1481) @​animafps

https://github.com/TypeStrong/ts-node/milestone/5

v10.2.1

Compare Source

Fixed

  • Fixes #​1426: Do not import typescript outside of configuration/project loading (#​1433, #​1426) @​Songkeys
    • We take care to load your project's version of typescript, falling back to a globally-installed version if necessary.
    • 10.2.0 introduced a bug where we did not do this consistently, causing global or npx installations of ts-node to attempt loading typescript relative to themselves, not your project.
    • This failed if typescript was not globally installed or npx did not install peer dependencies.

https://github.com/TypeStrong/ts-node/milestone/6

v10.2.0

Compare Source

Questions about this release? Ask in the official discussion thread: #​1423

Added

  • Adds top-level await support to REPL (#​1383, #​245) @​ejose19
    • can be disabled with --no-experimental-repl-await, experimentalReplAwait, or TS_NODE_EXPERIMENTAL_REPL_AWAIT (CLI docs, API docs)
  • Setting "pretty": false disables pretty formatting of diagnostics even when stdout is a TTY (#​1418, #​1420) @​elevatebart
    • Applies to ts-node's pretty option, not to be confused with TypeScript's pretty option
  • Ignores diagnostics which are annoying in an interactive REPL (#​1396, #​1120, #​729, #​850, #​469)
    • For example, when you input const foo = 1 in the REPL, foo is unused. We ignore the resulting diagnostic foo is declared but its value is never read
    • Diagnostics are only ignored in the REPL
    • Diagnostics for non-REPL files imported by the REPL will still be shown
  • Logged stack traces are colorized to match vanilla node's behavior (#​1412, #​1405)

Fixed

https://github.com/TypeStrong/ts-node/milestone/2

v10.1.0

Compare Source

Questions about this release? Ask in the official discussion thread: #​1390

Added

  • Add "moduleType" option to override module type -- CommonJS or ECMAScript -- on select files. (docs) (#​1342, #​1371, #​1376)
    • Useful when a configuration file, for example webpack.config.ts, must execute as CommonJS but the rest of the project is ESM
    • selectively overrides package.json "type" and tsconfig.json "module"
    • akin to .cjs and .mjs extensions, but for .ts and .tsx files
    • thanks to @​jayaddison for help on test coverage
  • Implement "extends" support for "ts-node" options in tsconfig.json (#​1328, #​1356)
    • "ts-node": {} options will be parsed from extended tsconfigs
    • allows sharing and deduplicating ts-node configuration
  • Un-deprecate scope and scopeDir; add both to CLI and tsconfig.json options; un-deprecate TS_NODE_SCOPE env var; add TS_NODE_SCOPE_DIR env var (docs) (#​1346, #​1367)

Changed

  • Improve error messages thrown by native ESM loader hooks (#​1357, #​1373) @​tars0x9752
    • messages more closely match node; are more descriptive
  • Emit "ts-node" object at the top of --showConfig output instead of the bottom (#​1355)

Fixed

  • Fix #​1282: Set correct globals in [stdin], [eval], and <repl> contexts (#​1333)
    • More closely align ts-node's behavior with vanilla node
    • Affects the interactive REPL, piping to stdin, and ts-node -e
    • Matches node's behavior for globals __filename, __dirname, module and sub-fields of module, exports, and builtin module aliases fs, etc
  • Fix #​1343: Set swc option keepClassNames to true (#​1344)
  • Fix: #​1387: REPL outputs 'use strict' after first empty line of input (#​1388) @​ejose19

Docs

  • Update ESM docs to say that env vars are supported with node --loader ts-node/esm (docs) (#​1379)

https://github.com/TypeStrong/ts-node/milestone/3

v10.0.0

Compare Source

Questions about this release? Ask in the official discussion thread: #​1337

Breaking changes are prefixed with [BREAKING]

Added

Changed

  • [BREAKING] Make --script-mode default behavior; resolve tsconfig relative to entrypoint script instead of cwd (#​949, #​1197, #​1155)
    • In most cases this change will have no noticeable effect
    • Primarily benefits portable shell scripts on your $PATH, because ts-node will respect the script's local tsconfig.json
    • Use --cwd-mode or ts-node-cwd if you need legacy behavior
  • [BREAKING] ignore rules evaluate relative to tsconfig.json directory, otherwise cwd (#​1155)
  • [BREAKING] Remove support for node 10. Minimum supported version is node 12 (#​1312)
  • Rename --dir to --cwd; rename TS_NODE_DIR to TS_NODE_CWD (#​1155)
    • --dir and TS_NODE_DIR are deprecated but still parsed for backwards-compatibility
    • --dir effectively changed the working directory of ts-node; renaming makes this behavior more obvious

Deprecated

Removed

  • [BREAKING] Internal APIs removed from type declarations (#​1242)
    • Removed DEFAULTS, normalizeSlashes, parse, split
    • No features were removed
    • This will only affect consumers of ts-node's programmatic API

Fixed

  • [BREAKING] Fix #​1229 and #​1235: always throw ERR_REQUIRE_ESM when attempting to execute ESM as CJS, even when not using --loader ts-node/esm (#​1232)
    • This aligns our behavior with vanilla node
  • [BREAKING] Fix #​1225: compiler is loaded relative to tsconfig.json instead of entrypoint script (#​1155)
    • In most cases this change will have no noticable effect
  • Fix #​1217: REPL not always using passed stdout and stderr (#​1224)
  • Fix #​1220: ts-node ./index may execute the wrong file extension because tsconfig search poisons the require.resolve cache (#​1155)
  • Fix #​1322: Sourcemaps fail for filenames with spaces or other characters which are percent-encoded in URLs (#​1160, #​1330)
  • Fix #​1331: Resolution of node builtin modules in ESM loader fails on node >=12.20.0, <13 (#​1332)

Docs

https://github.com/TypeStrong/ts-node/milestone/1


Configuration

📅 Schedule: "before 3am on Friday" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate-bot renovate-bot requested a review from a team as a code owner October 22, 2021 02:37
@forking-renovate forking-renovate bot added the dependencies Pull requests that update a dependency file label Oct 22, 2021
@codecov
Copy link

codecov bot commented Oct 22, 2021

Codecov Report

Merging #712 (f148f78) into main (9326c99) will decrease coverage by 0.40%.
The diff coverage is n/a.

❗ Current head f148f78 differs from pull request most recent head 6af424c. Consider uploading reports for the commit 6af424c to get more accurate results

@@            Coverage Diff             @@
##             main     #712      +/-   ##
==========================================
- Coverage   94.90%   94.50%   -0.41%     
==========================================
  Files          13        7       -6     
  Lines         707      528     -179     
  Branches      142      103      -39     
==========================================
- Hits          671      499     -172     
+ Misses         36       29       -7     
Impacted Files Coverage Δ
...y-instrumentation-long-task/src/instrumentation.ts
...trumentation-document-load/src/enums/EventNames.ts
...strumentation-document-load/src/instrumentation.ts
...entelemetry-instrumentation-long-task/test/util.ts
...entation-document-load/src/enums/AttributeNames.ts
...lemetry-instrumentation-document-load/src/utils.ts

@blumamir
Copy link
Member

resolved the conflict in package.json

@rauno56
Copy link
Member

rauno56 commented Jan 14, 2022

@blumamir, I don't think it's required anymore: #554

@blumamir
Copy link
Member

#554

good catch @rauno56 , created #835 to remove them and closing this one.

@blumamir blumamir closed this Jan 14, 2022
@forking-renovate
Copy link

Renovate Ignore Notification

As this PR has been closed unmerged, Renovate will ignore this upgrade and you will not receive PRs for any future 10.x releases. However, if you upgrade to 10.x manually then Renovate will reenable minor and patch updates automatically.

If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.

@renovate-bot renovate-bot deleted the renovate/ts-node-10.x branch January 14, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants