first commit
Some checks failed
Test examples / Test Examples (20) (push) Has been cancelled
Test examples / Test Examples (22) (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Trigger Release / start (push) Has been cancelled
Stale issue handler / stale (push) Has been cancelled
Update Font Data / create-pull-request (push) Has been cancelled
build-and-deploy / deploy-target (push) Has been cancelled
build-and-deploy / build (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / build-wasm (nodejs) (push) Has been cancelled
build-and-deploy / build-wasm (web) (push) Has been cancelled
build-and-deploy / Deploy preview tarball (push) Has been cancelled
build-and-deploy / Potentially publish release (push) Has been cancelled
build-and-deploy / publish-turbopack-npm-packages (push) Has been cancelled
build-and-deploy / Deploy examples (push) Has been cancelled
build-and-deploy / thank you, build (push) Has been cancelled
build-and-deploy / Upload Turbopack Bytesize metrics to Datadog (push) Has been cancelled
Rspack Next.js development integration tests / Rspack integration tests (push) Has been cancelled
Rspack Next.js production integration tests / Rspack integration tests (push) Has been cancelled
Turbopack Next.js development integration tests / Next.js integration tests (push) Has been cancelled
Turbopack Next.js production integration tests / Next.js integration tests (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack development test manifest (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack production test manifest (push) Has been cancelled
Upload bundler test manifests to areweturboyet.com / Upload test results (push) Has been cancelled
Update React / create-pull-request (push) Has been cancelled
test-e2e-project-reset-cron / reset-test-project (push) Has been cancelled
Notify about the top 15 issues/PRs/feature requests (most reacted) in the last 90 days / run (push) Has been cancelled

This commit is contained in:
Arian Tron
2026-03-10 19:37:31 +03:30
commit 61f56f997c
27684 changed files with 2784175 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
'use client'
export const value =
'browser-module/' + (typeof window !== 'undefined' ? 'browser' : 'other')

View File

@@ -0,0 +1 @@
export const value = 'browser-module/index'

View File

@@ -0,0 +1,7 @@
{
"type": "module",
"exports": {
"browser": "./browser.js",
"default": "./index.js"
}
}

View File

@@ -0,0 +1 @@
exports.packageEntry = 'cjs-esm-compat/index.cjs'

View File

@@ -0,0 +1 @@
export const packageEntry = 'cjs-esm-compat/index.mjs'

View File

@@ -0,0 +1,7 @@
{
"exports": {
"import": "./index.mjs",
"require": "./index.cjs",
"default": "./index.cjs"
}
}

View File

@@ -0,0 +1 @@
exports.packageName = 'cjs-lib'

View File

@@ -0,0 +1,4 @@
{
"name": "cjs-lib",
"exports": "./index.js"
}

View File

@@ -0,0 +1,8 @@
class PrivatePropertyClass {
#prop = 'prop'
getProp() {
return this.#prop
}
}
exports.instance = new PrivatePropertyClass()

View File

@@ -0,0 +1,3 @@
{
"exports": "./index.cjs"
}

View File

@@ -0,0 +1,3 @@
'use client'
module.exports = require('client-esm-module-wildcard')

View File

@@ -0,0 +1,5 @@
{
"name": "client-cjs-import-esm-wildcard",
"type": "commonjs",
"exports": "./index.js"
}

View File

@@ -0,0 +1,5 @@
'use client'
export function Bar() {
return 'Bar'
}

View File

@@ -0,0 +1,5 @@
'use client'
export function Foo() {
return 'Foo'
}

View File

@@ -0,0 +1,2 @@
export * from './foo'
export * from './bar'

View File

@@ -0,0 +1,7 @@
{
"name": "client-esm-module-wildcard-2",
"type": "module",
"exports": {
"default": "./index.js"
}
}

View File

@@ -0,0 +1,3 @@
'use client'
export * from './lib'

View File

@@ -0,0 +1,3 @@
export function Hello() {
return 'hello'
}

View File

@@ -0,0 +1,5 @@
{
"name": "client-esm-module-wildcard",
"type": "module",
"exports": "./index.js"
}

View File

@@ -0,0 +1,5 @@
'use client'
export function Hello() {
return 'hello'
}

View File

@@ -0,0 +1,5 @@
{
"name": "client-esm-module",
"type": "module",
"exports": "./index.js"
}

View File

@@ -0,0 +1,3 @@
'use client'
module.exports = () => 'hello'

View File

@@ -0,0 +1,3 @@
'use client'
export default () => 'hello'

View File

@@ -0,0 +1,5 @@
{
"name": "client-module",
"main": "index.js",
"module": "index.mjs"
}

View File

@@ -0,0 +1,5 @@
const { NextResponse } = require('next/server')
exports.respond = function () {
return NextResponse.next()
}

View File

@@ -0,0 +1,5 @@
import { NextResponse } from 'next/server'
export function respond() {
return NextResponse.next()
}

View File

@@ -0,0 +1,9 @@
{
"exports": {
".": {
"import": "./index.mjs",
"require": "./index.js",
"default": "./index.js"
}
}
}

View File

@@ -0,0 +1 @@
module.exports = 'index.default'

View File

@@ -0,0 +1 @@
module.exports = 'index.react-server'

View File

@@ -0,0 +1,19 @@
{
"name": "conditional-exports-optout",
"main": "index.js",
"exports": {
".": {
"react-server": "./index.server.js",
"default": "./index.js"
},
"./subpath": {
"react-server": "./subpath.server.js",
"default": "./subpath.js"
},
"./react": {
"import": "./react.mjs",
"default": "./react.js"
},
"./package.json": "./package.json"
}
}

View File

@@ -0,0 +1,7 @@
const React = require('react')
function getReactVersion() {
return React.version
}
exports.getReactVersion = getReactVersion

View File

@@ -0,0 +1,5 @@
import React from 'react'
export function getReactVersion() {
return React.version
}

View File

@@ -0,0 +1 @@
module.exports = 'subpath.default'

View File

@@ -0,0 +1 @@
module.exports = 'subpath.react-server'

View File

@@ -0,0 +1 @@
module.exports = 'dep.default'

View File

@@ -0,0 +1 @@
module.exports = 'dep.server'

View File

@@ -0,0 +1,8 @@
const react = require('react')
const dep = require('#dep')
module.exports =
'index.default:' +
('useState' in react ? 'react.full' : 'react.subset') +
':' +
dep

View File

@@ -0,0 +1,8 @@
const react = require('react')
const dep = require('#dep')
module.exports =
'index.react-server:' +
('useState' in react ? 'react.full' : 'react.subset') +
':' +
dep

View File

@@ -0,0 +1,24 @@
{
"name": "conditional-exports",
"main": "index.js",
"imports": {
"#dep": {
"react-server": "./dep.server.js",
"default": "./dep.js"
}
},
"exports": {
".": {
"react-server": "./index.server.js",
"default": "./index.js"
},
"./subpath": {
"react-server": "./subpath.server.js",
"default": "./subpath.js"
},
"./react": {
"import": "./react.js"
},
"./package.json": "./package.json"
}
}

View File

@@ -0,0 +1,5 @@
import React from 'react'
export function getReactVersion() {
return React.version
}

View File

@@ -0,0 +1 @@
module.exports = 'subpath.default'

View File

@@ -0,0 +1 @@
module.exports = 'subpath.react-server'

View File

@@ -0,0 +1 @@
import './style.css'

View File

@@ -0,0 +1,5 @@
import styles from './styles.module.css'
export default function Foo() {
return <h1 className={styles.h1}>Hello</h1>
}

View File

@@ -0,0 +1,11 @@
{
"name": "css",
"type": "module",
"sideEffects": false,
"exports": {
".": "./index.js",
"./style.css": "./style.css",
"./module": "./module.js",
"./package.json": "./package.json"
}
}

View File

@@ -0,0 +1,3 @@
body {
color: red;
}

View File

@@ -0,0 +1,3 @@
.h1 {
color: red;
}

View File

@@ -0,0 +1 @@
exports.value = 'dual-pkg-optout:cjs'

View File

@@ -0,0 +1 @@
export const value = 'dual-pkg-optout:mjs'

View File

@@ -0,0 +1,6 @@
{
"exports": {
"import": "./index.mjs",
"require": "./index.cjs"
}
}

View File

@@ -0,0 +1,6 @@
import React from 'react'
const Context = React.createContext ? React.createContext('hello') : null
export const version = React.version
export const useValue = () => React.useContext(Context)

View File

@@ -0,0 +1,9 @@
{
"name": "esm-with-react",
"type": "module",
"exports": "./index.js",
"dependencies": {
"react": "^18",
"react-dom": "^18"
}
}

View File

@@ -0,0 +1 @@
export default 'external-pure-esm-lib'

View File

@@ -0,0 +1,5 @@
{
"name": "esm",
"type": "module",
"exports": "./index.js"
}

View File

@@ -0,0 +1,3 @@
import localFont from 'next/font/local'
export const myFont = localFont({ src: './my-font.woff2' })

Binary file not shown.

View File

@@ -0,0 +1,4 @@
{
"name": "font",
"main": "index.ts"
}

View File

@@ -0,0 +1,14 @@
import React from 'react'
;(module) => {
module.exports = {}
}
export const value = 'mixed-syntax-esm'
export function Component() {
return /*#__PURE__*/ React.createElement(
'p',
{ id: 'component' },
'mixed-syntax-esm'
)
}

View File

@@ -0,0 +1,3 @@
{
"exports": "./index.mjs"
}

View File

@@ -0,0 +1,6 @@
import * as React from 'react'
export function NamespaceImport(props) {
React.useState(0)
return React.createElement('p', props, 'namespace-import:esm')
}

View File

@@ -0,0 +1,4 @@
{
"name": "namespace-import-esm",
"exports": "./index.mjs"
}

View File

@@ -0,0 +1,3 @@
const value = require('cjs-esm-compat').packageEntry
exports.default = 'nested-import:cjs:' + value

View File

@@ -0,0 +1,5 @@
import { packageEntry as value } from 'cjs-esm-compat'
const packageEntry = 'nested-import:esm:' + value
export default packageEntry

View File

@@ -0,0 +1,6 @@
{
"exports": {
"import": "./index.mjs",
"require": "./index.cjs"
}
}

View File

@@ -0,0 +1,9 @@
Object.defineProperty(exports, '__esModule', { value: true })
const server_1 = require('next/server')
const createResponse = (...args) => {
return new server_1.NextResponse(...args)
}
exports.createResponse = createResponse
exports.packageName = 'cjs-lib'
// Note: this is a CJS library that used the `NextResponse` export from `next/server`.

View File

@@ -0,0 +1,4 @@
{
"name": "next-server-cjs-lib",
"exports": "./index.js"
}

View File

@@ -0,0 +1,3 @@
export default () => 'browser-export'
export const named = 'named'
export const value = 123

View File

@@ -0,0 +1,6 @@
Object.defineProperty(exports, '__esModule', { value: true })
exports.default = () => 'esm-export'
exports.named = 'named'
exports.value = 123
exports.array = [4, 5, 6]
exports.obj = { x: 1 }

View File

@@ -0,0 +1,5 @@
export default () => 'esm-export'
export const named = 'named'
export const value = 123
export const array = [4, 5, 6]
export const obj = { x: 1 }

View File

@@ -0,0 +1,8 @@
{
"name": "non-isomorphic-text",
"exports": {
"import": "./index.mjs",
"require": "./index.js"
},
"browser": "./browser.js"
}

View File

@@ -0,0 +1,2 @@
export const random = ~~(Math.random() * 1e5)
export const name = 'pure-esm-module'

View File

@@ -0,0 +1,7 @@
{
"name": "pure-esm-module",
"type": "module",
"exports": {
"import": "./index.js"
}
}

View File

@@ -0,0 +1,7 @@
'use server'
export async function action1() {
console.log(
`action-log:${typeof window === 'undefined' ? 'server' : 'client'}:action1`
)
}

View File

@@ -0,0 +1,3 @@
{
"exports": "./index.js"
}

View File

@@ -0,0 +1,5 @@
import { NextRequest } from 'next/server'
export function serverApi(req) {
return new NextRequest(req)
}

View File

@@ -0,0 +1,5 @@
{
"name": "server-api-module",
"type": "module",
"exports": "./index.js"
}

View File

@@ -0,0 +1 @@
exports.name = 'server-module-field:main'

View File

@@ -0,0 +1 @@
export const name = 'server-module-field:module'

View File

@@ -0,0 +1,4 @@
{
"main": "./index.cjs",
"module": "./index.esm.js"
}

View File

@@ -0,0 +1 @@
export default 'a'

View File

@@ -0,0 +1,4 @@
export async function load(name) {
let value = (await import(name)).default
return `loaded ${value}`
}

View File

@@ -0,0 +1,4 @@
{
"name": "transitive-external",
"exports": "./index.mjs"
}

View File

@@ -0,0 +1,6 @@
import { load as loadInternal } from 'transitive-external'
export async function load(name) {
let value = await loadInternal('./' + name + '.mjs')
return `transitive ${value}`
}

View File

@@ -0,0 +1,4 @@
{
"name": "transitive",
"exports": "./index.mjs"
}

View File

@@ -0,0 +1 @@
exports.packageName = 'transpile-cjs-lib'

View File

@@ -0,0 +1,5 @@
{
"name": "transpile-cjs-lib",
"type": "commonjs",
"exports": "./index.js"
}

View File

@@ -0,0 +1,3 @@
export default function add(a: number, b: number) {
return a + b
}

View File

@@ -0,0 +1,4 @@
{
"name": "transpile-ts-lib",
"main": "index.ts"
}