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

Tracking branch for Next.js’s upcoming TypeScript #458

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions modules-js/config-babel/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = api => ({
require('@babel/preset-env'),
{
useBuiltIns: 'usage',
corejs: '2',
modules: api.env('esm') ? false : undefined,
},
],
Expand Down
1 change: 1 addition & 0 deletions modules-js/config-babel/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = () => ({
{
'preset-env': {
useBuiltIns: 'usage',
corejs: '2',
},
},
],
Expand Down
14 changes: 7 additions & 7 deletions modules-js/config-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"license": "CC0-1.0",
"private": true,
"dependencies": {
"@babel/core": "7.1.2",
"@babel/plugin-proposal-class-properties": "7.1.0",
"@babel/plugin-proposal-decorators": "7.0.0",
"@babel/plugin-transform-runtime": "7.0.0",
"@babel/preset-env": "7.1.0",
"@babel/preset-react": "7.0.0",
"@babel/core": "7.4.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-decorators": "^7.3.0",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.2",
"babel-plugin-require-context-hook": "^1.0.0",
"next": "8.0.3"
"next": "canary"
},
"devDependencies": {
"core-js": "^2.6.4"
Expand Down
8 changes: 4 additions & 4 deletions modules-js/form-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"core-js": "^2.6.4"
},
"peerDependencies": {
"@babel/runtime": "7.1.2",
"@babel/runtime": "^7.4.5",
"react": "16.8.5"
},
"devDependencies": {
"@babel/cli": "7.1.5",
"@babel/core": "7.1.2",
"@babel/runtime": "7.1.2",
"@babel/cli": "^7.4.4",
"@babel/core": "7.4.5",
"@babel/runtime": "^7.4.5",
"@cityofboston/config-babel": "^0.0.0",
"@cityofboston/config-typescript": "^0.0.0",
"@types/jest": "24.x.x",
Expand Down
4 changes: 2 additions & 2 deletions modules-js/graphql-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"core-js": "^2.6.4"
},
"devDependencies": {
"@babel/cli": "7.1.5",
"@babel/core": "7.1.2",
"@babel/cli": "^7.4.4",
"@babel/core": "7.4.5",
"@cityofboston/config-babel": "^0.0.0",
"@cityofboston/config-typescript": "^0.0.0",
"@types/jest": "24.x.x",
Expand Down
2 changes: 1 addition & 1 deletion modules-js/hapi-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"inert": "5.x.x"
},
"devDependencies": {
"@babel/core": "7.1.2",
"@babel/core": "7.4.5",
"@cityofboston/config-babel": "^0.0.0",
"@cityofboston/config-typescript": "^0.0.0",
"@types/hoek": "^4.1.3",
Expand Down
4 changes: 2 additions & 2 deletions modules-js/hapi-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"dependencies": {
"compression": "^1.6.2",
"core-js": "^2.6.4",
"next": "8.0.3",
"next": "canary",
"react": "16.8.5",
"react-dom": "16.8.5"
},
"devDependencies": {
"@babel/core": "7.1.2",
"@babel/core": "7.4.5",
"@cityofboston/config-babel": "^0.0.0",
"@cityofboston/config-typescript": "^0.0.0",
"@types/hapi": "^17.0.19",
Expand Down
7 changes: 4 additions & 3 deletions modules-js/hapi-next/src/hapi-next.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import querystring from 'querystring';
import next from 'next';
import compression from 'compression';

import {
Expand Down Expand Up @@ -34,7 +33,8 @@ import { promisify } from 'util';
* );
*/
export function makeRoutesForNextApp(
app: next.Server,
// TODO: change to Next server object when its type is available
app: any,
pathPrefix: string = '/',
pageRouteOptions: RouteOptions | ((server: HapiServer) => RouteOptions) = {},
staticRouteOptions:
Expand Down Expand Up @@ -121,7 +121,8 @@ export function makeRoutesForNextApp(
* path. E.g.: /certificates/12345 should be handled by the "certificates" page.
*/
export function makeNextHandler(
app: next.Server,
// TODO: change to Next server object when its type is available
app: any,
page: string | null = null
): Lifecycle.Method {
return async (request: HapiRequest, h: ResponseToolkit) => {
Expand Down
2 changes: 1 addition & 1 deletion modules-js/mssql-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"mssql": "^4.2.1"
},
"devDependencies": {
"@babel/core": "7.1.2",
"@babel/core": "7.4.5",
"@cityofboston/config-babel": "^0.0.0",
"@cityofboston/config-typescript": "^0.0.0",
"@types/jest": "24.x.x",
Expand Down
12 changes: 6 additions & 6 deletions modules-js/next-client-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
"isomorphic-fetch": "^2.2.1"
},
"peerDependencies": {
"@babel/runtime": "7.1.2",
"next": "8.0.3",
"@babel/runtime": "^7.4.5",
"next": "canary",
"nprogress": "^0.2.0"
},
"devDependencies": {
"@babel/cli": "7.1.5",
"@babel/core": "7.1.2",
"@babel/runtime": "7.1.2",
"@babel/cli": "^7.4.4",
"@babel/core": "7.4.5",
"@babel/runtime": "^7.4.5",
"@cityofboston/config-babel": "^0.0.0",
"@cityofboston/config-typescript": "^0.0.0",
"@types/google.analytics": "^0.0.39",
Expand All @@ -47,7 +47,7 @@
"concurrently": "^3.5.1",
"cross-env": "^5.2.0",
"jest": "^24.8.0",
"next": "8.0.3",
"next": "canary",
"nprogress": "^0.2.0",
"rimraf": "^2.6.2",
"rollup": "^0.60.1",
Expand Down
9 changes: 4 additions & 5 deletions modules-js/react-fleet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"peerDependencies": {
"@emotion/core": "^10.0.10",
"@babel/runtime": "7.1.2",
"@babel/runtime": "^7.4.5",
"detect-browser": "^3.0.1",
"prop-types": "^15.6.0",
"react": "16.8.5",
Expand All @@ -42,10 +42,9 @@
"string-hash": "^1.1.3"
},
"devDependencies": {
"@babel/cli": "7.1.5",
"@babel/core": "7.1.2",
"@babel/preset-react": "7.0.0",
"@babel/runtime": "7.1.2",
"@babel/cli": "^7.4.4",
"@babel/core": "7.4.5",
"@babel/runtime": "^7.4.5",
"@cityofboston/config-babel": "^0.0.0",
"@cityofboston/config-typescript": "^0.0.0",
"@cityofboston/percy-common": "^0.0.0",
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"templates/js-*/build/*"
],
"nohoist": [
"**/@cityofboston/config-typescript"
"**/@cityofboston/config-typescript",
"**/acorn",
"**/acorn-dynamic-import"
]
},
"scripts": {
Expand All @@ -37,7 +39,7 @@
},
"devDependencies": {
"@yarnpkg/lockfile": "^1.0.0",
"@babel/core": "^7.4.4",
"@babel/core": "7.4.5",
"babel-eslint": "^11.0.0-beta.0",
"eslint": "^5.16.0",
"eslint-plugin-emotion": "^10.0.7",
Expand Down
8 changes: 4 additions & 4 deletions services-js/311-indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
]
},
"dependencies": {
"@babel/runtime": "7.1.2",
"@babel/runtime": "^7.4.5",
"@cityofboston/srv-decrypt-env": "^0.0.0",
"aws-sdk": "^2.100.0",
"cometd": "^4.0.3",
Expand All @@ -43,9 +43,9 @@
"url-search-params": "^0.10.0"
},
"devDependencies": {
"@babel/cli": "7.1.5",
"@babel/core": "7.1.2",
"@babel/node": "7.0.0",
"@babel/cli": "^7.4.4",
"@babel/core": "7.4.5",
"@babel/node": "^7.4.5",
"@cityofboston/config-babel": "^0.0.0",
"@cityofboston/config-typescript": "^0.0.0",
"@types/cometd": "^4.0.4",
Expand Down
Loading