Skip to content

Commit

Permalink
Require Node.js 12.20 and move to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Aug 23, 2021
1 parent 9c01990 commit ede1a54
Show file tree
Hide file tree
Showing 9 changed files with 395 additions and 376 deletions.
4 changes: 0 additions & 4 deletions .github/funding.yml

This file was deleted.

6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Expand Up @@ -10,12 +10,10 @@ jobs:
fail-fast: false
matrix:
node-version:
- 14
- 12
- 10
- 16
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
14 changes: 7 additions & 7 deletions example.js
@@ -1,16 +1,16 @@
'use strict';
const chalk = require('chalk');
const Ora = require('.');
import process from 'node:process';
import chalk from 'chalk';
import ora from './index.js';

const spinner = new Ora({
const spinner = ora({
discardStdin: false,
text: 'Loading unicorns, not discarding stdin',
spinner: process.argv[2]
spinner: process.argv[2],
});

const spinnerDiscardingStdin = new Ora({
const spinnerDiscardingStdin = ora({
text: 'Loading unicorns',
spinner: process.argv[2]
spinner: process.argv[2],
});

spinnerDiscardingStdin.start();
Expand Down

0 comments on commit ede1a54

Please sign in to comment.