Skip to content

Commit

Permalink
Merge branch 'master' of github.com:martpie/next-transpile-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
martpie committed Oct 26, 2021
2 parents 4894ce4 + adae64c commit 602459d
Show file tree
Hide file tree
Showing 10 changed files with 2,019 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ jobs:
- name: Install tests apps dependencies (pnpn workspaces)
run: npx pnpm i --frozen-lockfile --prefix src/__tests__/__apps__/pnpm

- name: Install tests apps dependencies (swc)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/swc

- name: Build test apps
run: npm run test:prepare

Expand Down
6 changes: 6 additions & 0 deletions jest-puppeteer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const yarnWorkspacesSymlinksAppPath = 'src/__tests__/__apps__/yarn-workspaces-sy
const webpack5AppPath = 'src/__tests__/__apps__/webpack-4/app';
const webpack5SymlinksAppPath = 'src/__tests__/__apps__/webpack-4-symlinks/app';
const pnpmAppPath = 'src/__tests__/__apps__/pnpm';
const swcAppPath = 'src/__tests__/__apps__/swc/app';

module.exports = {
launch: {
Expand Down Expand Up @@ -42,5 +43,10 @@ module.exports = {
launchTimeout: 20000,
port: 3505,
},
{
command: `yarn --cwd ${swcAppPath} run start --port 3506`,
launchTimeout: 20000,
port: 3506,
},
],
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"typings": "tsc",
"prepublishOnly": "npm run typings",
"pretest": "npm run setup",
"quickie": "node --trace-uncaught src/__tests__/setup.js && yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run dev",
"quickie": "node --trace-uncaught src/__tests__/setup.js && yarn --cwd src/__tests__/__apps__/swc/app run dev",
"test": "jest --forceExit",
"test:debug": "jest --detectOpenHandles --forceExit",
"test:lint": "eslint .",
Expand All @@ -27,7 +27,8 @@
"test:prepare:webpack-4": "yarn --cwd src/__tests__/__apps__/webpack-4/app run build",
"test:prepare:webpack-4-symlinks": "yarn --cwd src/__tests__/__apps__/webpack-4-symlinks/app run build",
"test:prepare:pnpm": "npm run build --prefix=src/__tests__/__apps__/pnpm",
"test:prepare": "npm run test:prepare:npm-basic && npm run test:prepare:yarn-workspaces && npm run test:prepare:yarn-workspaces-symlinks && npm run test:prepare:webpack-4 && npm run test:prepare:webpack-4-symlinks && npm run test:prepare:pnpm"
"test:prepare:swc": "yarn --cwd src/__tests__/__apps__/swc/app run build",
"test:prepare": "npm run test:prepare:npm-basic && npm run test:prepare:yarn-workspaces && npm run test:prepare:yarn-workspaces-symlinks && npm run test:prepare:webpack-4 && npm run test:prepare:webpack-4-symlinks && npm run test:prepare:pnpm && npm run test:prepare:swc"
},
"repository": {
"type": "git",
Expand Down
3 changes: 3 additions & 0 deletions scripts/next-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ yarn --cwd "$ROOT/src/__tests__/__apps__/yarn-workspaces/app" add "next@$NEXT_VE

echo "==================== YARN WORKSPACES SYMLINKS ===================="
yarn --cwd "$ROOT/src/__tests__/__apps__/yarn-workspaces-symlinks/app" add "next@$NEXT_VERSION"

echo "==================== SWC ===================="
yarn --cwd "$ROOT/src/__tests__/__apps__/swc/app" add "next@$NEXT_VERSION"
9 changes: 9 additions & 0 deletions src/__tests__/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ __apps__/webpack-4/shared-ui
__apps__/webpack-4-symlinks/shared
__apps__/webpack-4-symlinks/shared-ts
__apps__/webpack-4-symlinks/shared-ui
__apps__/swc/shared
__apps__/swc/shared-ts
__apps__/swc/shared-ui
__apps__/shared
__apps__/shared-ts
__apps__/shared-ui
Expand Down Expand Up @@ -49,3 +52,9 @@ __apps__/pnpm/styles
__apps__/pnpm/pages
!__apps__/pnpm/pages/.keep
__apps__/pnpm/next-transpile-modules.js

__apps__/swc/app/components
!__apps__/swc/app/components/.keep
__apps__/swc/app/pages
!__apps__/swc/app/pages/.keep
__apps__/swc/app/next-transpile-modules.js
2 changes: 1 addition & 1 deletion src/__tests__/__apps__/swc/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"license": "MIT",
"dependencies": {
"lodash-es": "^4.17.21",
"next": "11.1.3-canary.75",
"next": "11.1.3-canary.80",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"sass": "^1.27.0",
Expand Down
9 changes: 9 additions & 0 deletions src/__tests__/__apps__/swc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"private": true,
"workspaces": [
"shared",
"shared-ts",
"shared-ui",
"app"
]
}
Loading

0 comments on commit 602459d

Please sign in to comment.