ember-cli-typescript
Advanced tools
Comparing version 3.1.2 to 4.0.0-alpha.1
@@ -9,2 +9,18 @@ # Changelog | ||
## [4.0.0-alpha.1] - 2020-01-18 | ||
### Breaking 💥 | ||
- Drop support for Node 8 ([#1017]) | ||
- Don't configure Babel for TS transpilation ([#1018]) | ||
### Under the hood 🚗 | ||
- Upgrade [✨ Prettier ✨](https://prettier.io) to a version that supports optional chaining and nullish coalescing ([#1018]) | ||
- Add test for optional chaining and nullish coalescing ([#1018]) | ||
- Add test for class field declaration ([#1018]) | ||
[#1017]: https://github.com/typed-ember/ember-cli-typescript/pull/1017 | ||
[#1018]: https://github.com/typed-ember/ember-cli-typescript/pull/1018 | ||
## [3.1.2] - 2019-12-14 | ||
@@ -14,5 +30,7 @@ | ||
- Remove trailing space in the `global.d.ts` blueprint ([#866]) | ||
- Ensure we register Babel plugins with their full path ([#946]) | ||
- Ensure errors are emitted when `ts:precompile` fails ([#984]) | ||
[#866]: https://github.com/typed-ember/ember-cli-typescript/pull/866 | ||
[#946]: https://github.com/typed-ember/ember-cli-typescript/pull/946 | ||
@@ -32,3 +50,3 @@ [#984]: https://github.com/typed-ember/ember-cli-typescript/pull/984 | ||
[#993]: https://github.com/typed-ember/ember-cli-typescript/pull/993 | ||
[3.1.2-deps-bumps]: https://github.com/typed-ember/ember-cli-typescript/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+merged%3A2019-11-06T16%3A26%3A25%2B0100..2019-12-14T10%3A00%3A00%2B0600+chore%28deps%29+in%3Atitle | ||
[3.1.2-deps-bumps]: https://github.com/typed-ember/ember-cli-typescript/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+merged%3A2019-11-06T16%3A26%3A25%2B0100..2019-12-14T10%3A52%3A00%2B0600+chore%28deps%29+in%3Atitle+ | ||
@@ -608,3 +626,4 @@ ## [3.1.1] - 2019-11-06 | ||
[ember-cli-typify]: https://github.com/winding-lines/ember-cli-typify | ||
[unreleased]: https://github.com/typed-ember/ember-cli-typescript/compare/v3.1.2...HEAD | ||
[unreleased]: https://github.com/typed-ember/ember-cli-typescript/compare/v4.0.0-alpha.1...HEAD | ||
[4.0.0-alpha.1]: https://github.com/typed-ember/ember-cli-typescript/compare/v3.1.2...v4.0.0-alpha.1 | ||
[3.1.2]: https://github.com/typed-ember/ember-cli-typescript/compare/v3.1.1...v3.1.2 | ||
@@ -611,0 +630,0 @@ <!-- |
@@ -8,3 +8,2 @@ "use strict"; | ||
const child_process_1 = require("stagehand/lib/adapters/child-process"); | ||
const ember_cli_babel_plugin_helpers_1 = require("ember-cli-babel-plugin-helpers"); | ||
const ember_cli_entities_1 = require("./lib/utilities/ember-cli-entities"); | ||
@@ -63,21 +62,2 @@ const fork_1 = __importDefault(require("./lib/utilities/fork")); | ||
}, | ||
setupPreprocessorRegistry(type) { | ||
if (type !== 'parent') | ||
return; | ||
// Normally this is the sort of logic that would live in `included()`, but | ||
// ember-cli-babel reads the configured extensions when setting up the | ||
// preprocessor registry, so we need to beat it to the punch. | ||
this._registerBabelExtension(); | ||
// As of 3.7, TS supports the optional chaining and nullish coalescing proposals. | ||
// https://devblogs.microsoft.com/typescript/announcing-typescript-3-7-beta/ | ||
// Since we can't necessarily know what version of TS an addon was developed with, | ||
// we unconditionally add the Babel plugins for both proposals. | ||
this._addBabelPluginIfNotPresent('@babel/plugin-proposal-optional-chaining'); | ||
this._addBabelPluginIfNotPresent('@babel/plugin-proposal-nullish-coalescing-operator'); | ||
// Needs to come after the class properties plugin (see tests/unit/build-test.ts - | ||
// "property initialization occurs in the right order") | ||
this._addBabelPluginIfNotPresent('@babel/plugin-transform-typescript', { | ||
after: ['@babel/plugin-proposal-class-properties'], | ||
}); | ||
}, | ||
shouldIncludeChildAddon(addon) { | ||
@@ -91,2 +71,3 @@ // For testing, we have dummy in-repo addons set up, but e-c-ts doesn't depend on them; | ||
let version = babel && babel.pkg.version; | ||
// TODO update this check and warning message once we have a Babel version to target | ||
if (!babel || !(semver_1.default.gte(version, '7.7.3') && semver_1.default.lt(version, '8.0.0'))) { | ||
@@ -135,21 +116,2 @@ let versionString = babel ? `version ${babel.pkg.version}` : `no instance of ember-cli-babel`; | ||
}, | ||
_getConfigurationTarget() { | ||
// If `this.app` isn't present, we know `this.parent` is an addon | ||
return this.app || this.parent; | ||
}, | ||
_registerBabelExtension() { | ||
let target = this._getConfigurationTarget(); | ||
let options = target.options || (target.options = {}); | ||
let babelAddonOptions = options['ember-cli-babel'] || (options['ember-cli-babel'] = {}); | ||
let extensions = babelAddonOptions.extensions || (babelAddonOptions.extensions = ['js']); | ||
if (!extensions.includes('ts')) { | ||
extensions.push('ts'); | ||
} | ||
}, | ||
_addBabelPluginIfNotPresent(pluginName, pluginOptions) { | ||
let target = this._getConfigurationTarget(); | ||
if (!ember_cli_babel_plugin_helpers_1.hasPlugin(target, pluginName)) { | ||
ember_cli_babel_plugin_helpers_1.addPlugin(target, require.resolve(pluginName), pluginOptions); | ||
} | ||
}, | ||
_addTypecheckMiddleware(app) { | ||
@@ -156,0 +118,0 @@ let workerPromise = this._getTypecheckWorker(); |
{ | ||
"name": "ember-cli-typescript", | ||
"version": "3.1.2", | ||
"version": "4.0.0-alpha.1", | ||
"description": "Allow ember apps to use typescript files.", | ||
@@ -42,8 +42,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4", | ||
"@babel/plugin-proposal-optional-chaining": "^7.6.0", | ||
"@babel/plugin-transform-typescript": "~7.7.0", | ||
"ansi-to-html": "^0.6.6", | ||
"debug": "^4.0.0", | ||
"ember-cli-babel-plugin-helpers": "^1.0.0", | ||
"execa": "^3.0.0", | ||
@@ -53,3 +49,3 @@ "fs-extra": "^8.0.0", | ||
"rsvp": "^4.8.1", | ||
"semver": "^6.0.0", | ||
"semver": "^7.0.0", | ||
"stagehand": "^1.0.0", | ||
@@ -61,3 +57,3 @@ "walk-sync": "^2.0.0" | ||
"@commitlint/config-conventional": "8.2.0", | ||
"@ember/optional-features": "1.1.0", | ||
"@ember/optional-features": "1.2.0", | ||
"@typed-ember/renovate-config": "1.2.1", | ||
@@ -82,4 +78,4 @@ "@types/capture-console": "1.0.0", | ||
"@types/tmp": "0.1.0", | ||
"@typescript-eslint/eslint-plugin": "2.11.0", | ||
"@typescript-eslint/parser": "2.11.0", | ||
"@typescript-eslint/eslint-plugin": "2.12.0", | ||
"@typescript-eslint/parser": "2.12.0", | ||
"broccoli-asset-rev": "3.0.0", | ||
@@ -89,3 +85,3 @@ "capture-console": "1.0.1", | ||
"commitlint-azure-pipelines-cli": "1.0.2", | ||
"conventional-changelog-cli": "2.0.28", | ||
"conventional-changelog-cli": "2.0.31", | ||
"ember-cli": "3.14.0", | ||
@@ -108,3 +104,3 @@ "ember-cli-addon-docs": "ember-learn/ember-cli-addon-docs#4f5bfd11", | ||
"ember-cli-uglify": "3.0.0", | ||
"ember-cli-update": "0.47.1", | ||
"ember-cli-update": "0.47.2", | ||
"ember-disable-prototype-extensions": "1.1.3", | ||
@@ -121,3 +117,3 @@ "ember-export-application-global": "2.0.1", | ||
"eslint-plugin-node": "10.0.0", | ||
"eslint-plugin-prettier": "3.1.1", | ||
"eslint-plugin-prettier": "3.1.2", | ||
"esprima": "4.0.1", | ||
@@ -132,3 +128,3 @@ "fixturify": "1.2.0", | ||
"mocha": "6.2.2", | ||
"prettier": "1.18.2", | ||
"prettier": "1.19.1", | ||
"qunit-dom": "0.9.2", | ||
@@ -146,3 +142,3 @@ "testdouble": "3.12.4", | ||
"engines": { | ||
"node": "8.* || >= 10.*" | ||
"node": "10.* || >= 12.*" | ||
}, | ||
@@ -152,4 +148,3 @@ "ember-addon": { | ||
"before": [ | ||
"broccoli-watcher", | ||
"ember-cli-babel" | ||
"broccoli-watcher" | ||
] | ||
@@ -156,0 +151,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
9
10
184403
2036
1
+ Addedsemver@7.6.3(transitive)
- Removed@babel/plugin-proposal-nullish-coalescing-operator@^7.4.4
- Removed@ampproject/remapping@2.3.0(transitive)
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/compat-data@7.26.5(transitive)
- Removed@babel/core@7.26.0(transitive)
- Removed@babel/generator@7.26.5(transitive)
- Removed@babel/helper-annotate-as-pure@7.25.9(transitive)
- Removed@babel/helper-compilation-targets@7.26.5(transitive)
- Removed@babel/helper-create-class-features-plugin@7.25.9(transitive)
- Removed@babel/helper-member-expression-to-functions@7.25.9(transitive)
- Removed@babel/helper-module-imports@7.25.9(transitive)
- Removed@babel/helper-module-transforms@7.26.0(transitive)
- Removed@babel/helper-optimise-call-expression@7.25.9(transitive)
- Removed@babel/helper-plugin-utils@7.26.5(transitive)
- Removed@babel/helper-replace-supers@7.26.5(transitive)
- Removed@babel/helper-skip-transparent-expression-wrappers@7.25.9(transitive)
- Removed@babel/helper-string-parser@7.25.9(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/helper-validator-option@7.25.9(transitive)
- Removed@babel/helpers@7.26.0(transitive)
- Removed@babel/parser@7.26.5(transitive)
- Removed@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(transitive)
- Removed@babel/plugin-proposal-optional-chaining@7.21.0(transitive)
- Removed@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(transitive)
- Removed@babel/plugin-syntax-optional-chaining@7.8.3(transitive)
- Removed@babel/plugin-syntax-typescript@7.25.9(transitive)
- Removed@babel/plugin-transform-typescript@7.7.4(transitive)
- Removed@babel/template@7.25.9(transitive)
- Removed@babel/traverse@7.26.5(transitive)
- Removed@babel/types@7.26.5(transitive)
- Removed@jridgewell/gen-mapping@0.3.8(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removedbrowserslist@4.24.4(transitive)
- Removedcaniuse-lite@1.0.30001692(transitive)
- Removedconvert-source-map@2.0.0(transitive)
- Removedelectron-to-chromium@1.5.80(transitive)
- Removedember-cli-babel-plugin-helpers@1.1.1(transitive)
- Removedescalade@3.2.0(transitive)
- Removedgensync@1.0.0-beta.2(transitive)
- Removedglobals@11.12.0(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjsesc@3.1.0(transitive)
- Removedjson5@2.2.3(transitive)
- Removedlru-cache@5.1.1(transitive)
- Removednode-releases@2.0.19(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedsemver@6.3.1(transitive)
- Removedupdate-browserslist-db@1.1.2(transitive)
- Removedyallist@3.1.1(transitive)
Updatedsemver@^7.0.0