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

[prettierx] drop Node.js 4 support #31

Merged
merged 3 commits into from
Jan 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .azure-pipelines/jobs/prod-test-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# TBD TEMPORARY WORKAROUND to test on Node.js 6
# before dropping Node.js 4 support
# Based on: .azure-pipelines/jobs/prod-test-integration.yml

steps:
- template: ../steps/download-dist.yml
- template: ../steps/install-nodejs.yml
- template: ../steps/install-dependencies.yml
parameters:
flags: --ignore-engines # prettier@dev requires node v6+
- script: yarn test-integration
displayName: "Run tests on dist"
- template: ../steps/publish-test-results.yml
- template: ../steps/publish-code-coverage.yml
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Unofficial fork, intended to provide some additional options to help improve con

Language parsers are supported as if this were `prettier` version `1.15.3` / `1.16.0`; old language parsers are deprecated as if this were `prettier` version `1.15.3` / `1.16.0`.

Minimum Node.js version: 6

## CLI Usage

**Quick CLI usage:**
Expand Down
27 changes: 24 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,37 @@ jobs:
steps:
- template: .azure-pipelines/jobs/prod-lint.yml

# TBD TEMPORARY WORKAROUND here and in
# .azure-pipelines/jobs/prod-test-integration.yml
# to test on Node.js 6 before dropping Node.js 4 support
# FUTURE TODO: remove above workaround job file
# when this job can be removed.
- job: Prod_test_integration
dependsOn: Prod_Build
displayName: Prod test-integration on macOS
pool:
vmImage: macos-10.13
strategy:
matrix:
Node_v6:
node_version: 6
steps:
- template: .azure-pipelines/jobs/prod-test-integration.yml

- job: Prod_Test
dependsOn: Prod_Build
displayName: Prod Test on macOS
pool:
vmImage: macos-10.13
strategy:
matrix:
Node_v4:
node_version: 4
ENABLE_TEST_RESULTS: "" # jest-junit requires node v6+
# TBD NOT WORKING on Node.js 6 for some reason
# (ALSO NOT WORKING on Linux or Windows):
# Node_v6:
# node_version: 6
# ...
Node_v8:
node_version: 8
Node_v10:
node_version: 10
Node_v10_standalone:
Expand Down
4 changes: 3 additions & 1 deletion scripts/build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ async function cacheFiles() {
async function preparePackage() {
const pkg = await util.readJson("package.json");
pkg.bin = "./bin-prettierx.js";
pkg.engines.node = ">=4";
// FUTURE TBD use this line to specify a different minimum
// Node.js version, if needed in the future:
// pkg.engines.node = ">=6";
delete pkg.dependencies;
delete pkg.devDependencies;
pkg.scripts = {
Expand Down