Skip to content

Commit

Permalink
Merge branch 'canary' into add-gitignores
Browse files Browse the repository at this point in the history
  • Loading branch information
oBusk committed Aug 12, 2021
2 parents 68a5482 + b641140 commit 7aa78e6
Show file tree
Hide file tree
Showing 23 changed files with 47 additions and 26 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -265,6 +265,7 @@ jobs:
with:
name: next-swc-binaries
path: packages/next/build/swc/dist
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: ./scripts/publish-native.js $GITHUB_REF
- run: ./scripts/publish-release.sh

Expand Down
1 change: 1 addition & 0 deletions examples/with-fauna/package.json
@@ -1,4 +1,5 @@
{
"private": true,
"name": "with-fauna",
"version": "1.0.0",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -17,5 +17,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "11.1.1-canary.0"
"version": "11.1.1-canary.3"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
"@next/eslint-plugin-next": "11.1.1-canary.0",
"@next/eslint-plugin-next": "11.1.1-canary.3",
"@rushstack/eslint-patch": "^1.0.6",
"@typescript-eslint/parser": "^4.20.0",
"eslint-import-resolver-node": "^0.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"description": "ESLint plugin for NextJS.",
"main": "lib/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"license": "MIT",
"dependencies": {
"chalk": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
4 changes: 3 additions & 1 deletion packages/next/build/babel/loader/get-config.ts
Expand Up @@ -302,6 +302,7 @@ function getCacheKey(cacheCharacteristics: CharacteristicsGermaneToCaching) {

type BabelConfig = any
const configCache: Map<any, BabelConfig> = new Map()
const configFiles: Set<string> = new Set()

export default function getConfig(
this: NextJsLoaderContext,
Expand Down Expand Up @@ -346,7 +347,8 @@ export default function getConfig(
}
}

if (loaderOptions.configFile) {
if (loaderOptions.configFile && !configFiles.has(loaderOptions.configFile)) {
configFiles.add(loaderOptions.configFile)
Log.info(
`Using external babel configuration from ${loaderOptions.configFile}`
)
Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/entries.ts
Expand Up @@ -91,7 +91,7 @@ export function createEntrypoints(
buildId,
assetPrefix: config.assetPrefix,
generateEtags: config.generateEtags ? 'true' : '',
poweredByHeader: config.poweredByHeader,
poweredByHeader: config.poweredByHeader ? 'true' : '',
canonicalBase: config.amp.canonicalBase || '',
basePath: config.basePath,
runtimeConfig: hasRuntimeConfig
Expand Down
12 changes: 6 additions & 6 deletions packages/next/package.json
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -65,10 +65,10 @@
"dependencies": {
"@babel/runtime": "7.12.5",
"@hapi/accept": "5.0.2",
"@next/env": "11.1.1-canary.0",
"@next/polyfill-module": "11.1.1-canary.0",
"@next/react-dev-overlay": "11.1.1-canary.0",
"@next/react-refresh-utils": "11.1.1-canary.0",
"@next/env": "11.1.1-canary.3",
"@next/polyfill-module": "11.1.1-canary.3",
"@next/react-dev-overlay": "11.1.1-canary.3",
"@next/react-refresh-utils": "11.1.1-canary.3",
"@node-rs/helper": "1.2.1",
"assert": "2.0.0",
"ast-types": "0.13.2",
Expand Down Expand Up @@ -153,7 +153,7 @@
"@babel/traverse": "^7.12.10",
"@babel/types": "7.12.12",
"@napi-rs/cli": "1.1.0",
"@next/polyfill-nomodule": "11.1.1-canary.0",
"@next/polyfill-nomodule": "11.1.1-canary.3",
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
"@taskr/watch": "1.1.0",
Expand Down
17 changes: 17 additions & 0 deletions packages/next/server/config-shared.ts
Expand Up @@ -48,6 +48,22 @@ export type NextConfig = { [key: string]: any } & {
webpack5?: false
excludeDefaultMomentLocales?: boolean

webpack?:
| ((
config: any,
context: {
dir: string
dev: boolean
isServer: boolean
buildId: string
config: NextConfigComplete
defaultLoaders: { babel: any }
totalPages: number
webpack: any
}
) => any)
| null

trailingSlash?: boolean
env?: { [key: string]: string }
distDir?: string
Expand All @@ -58,6 +74,7 @@ export type NextConfig = { [key: string]: any } & {
generateEtags?: boolean
pageExtensions?: string[]
compress?: boolean
poweredByHeader?: boolean
images?: ImageConfig
devIndicators?: {
buildActivity?: boolean
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/react-dev-overlay",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"description": "A development-only overlay for developing React applications.",
"repository": {
"url": "vercel/next.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-refresh-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/react-refresh-utils",
"version": "11.1.1-canary.0",
"version": "11.1.1-canary.3",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-examples.sh
Expand Up @@ -3,7 +3,7 @@
for folder in examples/* ; do
if [ -f "$folder/package.json" ]; then
cp -n packages/create-next-app/templates/default/gitignore $folder/.gitignore;
cat $folder/package.json | jq '.license = "MIT"' | sponge $folder/package.json
cat $folder/package.json | jq '.license = "MIT" | .private = true' | sponge $folder/package.json
fi
done;

Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-native.js
Expand Up @@ -37,7 +37,7 @@ const cwd = process.cwd()
)
execSync(
`npm publish ${path.join(nativePackagesDir, nativePackage)}${
gitref.contains('canary') ? ' --tag canary' : ''
gitref.includes('canary') ? ' --tag canary' : ''
}`
)
// lerna publish in next step will fail if git status is not clean
Expand Down
2 changes: 0 additions & 2 deletions scripts/publish-release.sh
Expand Up @@ -12,8 +12,6 @@ if [[ -z "$NPM_TOKEN" ]];then
exit 0;
fi

echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc

if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];
then
echo "Publishing canary"
Expand Down
2 changes: 2 additions & 0 deletions test/integration/basic/test/index.test.js
Expand Up @@ -10,6 +10,7 @@ import dynamic from './dynamic'
import processEnv from './process-env'
import publicFolder from './public-folder'
import security from './security'
import developmentLogs from './development-logs'

const context = {}
jest.setTimeout(1000 * 60 * 5)
Expand All @@ -29,4 +30,5 @@ describe('Basic Features', () => {
processEnv(context)
publicFolder(context)
security(context)
developmentLogs(context)
})

0 comments on commit 7aa78e6

Please sign in to comment.