Skip to content

Commit

Permalink
chore: drop "mjs" source extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Oct 29, 2019
1 parent 18f2c61 commit 9fea230
Show file tree
Hide file tree
Showing 23 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Install
run: |
npm install
npm install -g nyc@13 codecov
npm install -g nyc codecov
- name: Bootstrap, Lint, and Test
run: nyc --extension=.mjs npm test
run: nyc --include=packages/*/index.js npm test

- name: Report
if: matrix.nodejs == 12
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ coverage
*.lock
*.log

packages/*/index.js
packages/*/build.*
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://lukeed.com"
},
"scripts": {
"build": "lerna exec bundt index.mjs",
"build": "lerna exec bundt index.js",
"bootstrap": "lerna bootstrap --hoist",
"lint": "eslint packages --env node,es6",
"pretest": "npm run lint && npm run bootstrap",
Expand All @@ -15,11 +15,11 @@
"devDependencies": {
"bundt": "0.4.0",
"eslint": "5.15.0",
"esm": "3.2.22",
"esm": "3.2.25",
"httpie": "1.1.0",
"lerna": "3.13.4",
"tap-spec": "5.0.0",
"tape": "4.10.1"
"tape": "4.11.0"
},
"eslintConfig": {
"extends": "eslint:recommended",
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/cluster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"name": "@polka/cluster",
"repository": "lukeed/polka",
"description": "Intialize and run a HTTP cluster",
"module": "index.mjs",
"main": "index.js",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js",
"*.mjs"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down
4 changes: 3 additions & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"name": "@polka/compat",
"repository": "lukeed/polka",
"description": "WIP",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"name": "@polka/parse",
"repository": "lukeed/polka",
"description": "WIP",
"module": "index.mjs",
"main": "index.js",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js",
"*.mjs"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/polka/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"version": "1.0.0-next.6",
"repository": "lukeed/polka",
"description": "A micro web server so fast, it'll make you dance! :dancers:",
"module": "index.mjs",
"main": "index.js",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js",
"*.mjs"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down
2 changes: 1 addition & 1 deletion packages/polka/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import http from 'http';
import { get, send, post } from 'httpie';
import { test, listen } from './util';
import polka from '../index.mjs';
import polka from '../index';

const hasNamedGroups = 'groups' in /x/.exec('x');
const sleep = ms => new Promise(r => setTimeout(r, ms));
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/redirect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"name": "@polka/redirect",
"repository": "lukeed/polka",
"description": "A response helper for URL redirects",
"module": "index.mjs",
"main": "index.js",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js",
"*.mjs"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down
2 changes: 1 addition & 1 deletion packages/redirect/test/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'tape';
import fn from '../index.mjs';
import fn from '../index';

test.Test.prototype.isRedirect = function (arr, code=302) {
let [starting, next, result] = arr;
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"name": "@polka/send",
"repository": "lukeed/polka",
"description": "A response helper that detects & handles Content-Types",
"module": "index.mjs",
"main": "index.js",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js",
"*.mjs"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down
2 changes: 1 addition & 1 deletion packages/send/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from 'fs';
import test from 'tape';
import { join } from 'path';
import { Response, toStatusText } from './util';
import send from '../index.mjs';
import send from '../index';

const TYPE = 'Content-Type';
const LENGTH = 'Content-Length';
Expand Down
4 changes: 3 additions & 1 deletion packages/sendfile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"name": "@polka/sendfile",
"repository": "lukeed/polka",
"description": "WIP",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down
2 changes: 1 addition & 1 deletion packages/url/bench/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ global.native = require('url');
const { Suite } = require('benchmark');
global.querystring = require('querystring');
global.parseurl = require('parseurl');
global.parse = require('../');
global.parse = require('../build');

global.nativeDecode = function (url) {
let obj = global.native.parse(url, true);
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"name": "@polka/url",
"repository": "lukeed/polka",
"description": "Super fast, memoized `req.url` parser",
"module": "index.mjs",
"main": "index.js",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js",
"*.mjs"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down
2 changes: 1 addition & 1 deletion packages/url/test/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'tape';
import { parse } from 'url';
import fn from '../index.mjs';
import fn from '../index';

const keys = ['protocol', 'slashes', 'auth', 'host', 'port', 'hostname', 'hash'];

Expand Down
4 changes: 3 additions & 1 deletion packages/uws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"name": "@polka/uws",
"repository": "lukeed/polka",
"description": "WIP",
"module": "build.mjs",
"main": "build.js",
"license": "MIT",
"files": [
"*.js"
"build.*"
],
"author": {
"name": "Luke Edwards",
Expand Down

0 comments on commit 9fea230

Please sign in to comment.