Skip to content

Commit

Permalink
Merge pull request #96 from martpie/scss-fix-9.5.0
Browse files Browse the repository at this point in the history
Potential fix for CSS and SCSS issues
  • Loading branch information
martpie committed Jul 28, 2020
2 parents b63a885 + d54f8d2 commit 97d9f4c
Show file tree
Hide file tree
Showing 46 changed files with 14,211 additions and 7,314 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Report a bug
title: ''
labels: ''
assignees: ''

---

- [ ] I HAVE READ [THE FAQ](https://github.com/martpie/next-transpile-modules#faq) AND MY PROBLEM WAS NOT DESCRIBED THERE
Expand All @@ -28,6 +27,7 @@ A clear and concise description of what you expected to happen.
- Node.js version:
- `npm`/`yarn` version:
- Operating System:
- Webpack 4 or 5:

**Additional context**
Add any other context about the problem here.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
- name: Install tests apps dependencies (webpack 5)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/webpack-5

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

- name: 'Test: unit & end-to-end tests'
run: npm test

Expand Down
8 changes: 7 additions & 1 deletion jest-puppeteer.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const basicAppPath = 'src/__tests__/__apps__/basic';
const yarnWorkspacesAppPath = 'src/__tests__/__apps__/yarn-workspaces/app';
const webpack5AppPath = 'src/__tests__/__apps__/webpack-5';

module.exports = {
Expand All @@ -14,9 +15,14 @@ module.exports = {
port: 3000
},
{
command: `npm run build --prefix=${webpack5AppPath} && npm run start --prefix=${webpack5AppPath} -- --port 3001`,
command: `yarn --cwd ${yarnWorkspacesAppPath} run build && yarn --cwd ${yarnWorkspacesAppPath} run start -- --port 3001`,
launchTimeout: 50000,
port: 3001
},
{
command: `yarn --cwd ${webpack5AppPath} run build && yarn --cwd ${webpack5AppPath} run start -- --port 3002`,
launchTimeout: 50000,
port: 3002
}
]
};
10,524 changes: 3,307 additions & 7,217 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"slash": "^3.0.0"
},
"devDependencies": {
"@types/jest-environment-puppeteer": "^4.3.1",
"@types/jest-environment-puppeteer": "4.3.2",
"anymatch": "2.0.0",
"eslint": "6.8.0",
"eslint-config-prettier": "6.10.0",
Expand All @@ -47,11 +47,11 @@
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.0.1",
"jest": "25.1.0",
"jest-environment-puppeteer": "^4.4.0",
"jest-environment-puppeteer": "4.4.0",
"jest-puppeteer": "^4.4.0",
"prettier": "1.19.1",
"prettier-eslint": "9.0.1",
"puppeteer": "^2.1.1",
"puppeteer": "5.2.1",
"rewire": "4.0.1",
"webpack": "^4.44.0"
}
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/__apps__/basic/lib/next-transpile-modules.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/__tests__/__apps__/basic/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const withTM = require('./lib/next-transpile-modules')(['shared', 'shared-ts', 'shared-ui', 'lodash-es']);
const withTM = require('../../../next-transpile-modules')(['shared', 'shared-ts', 'shared-ui', 'lodash-es']);

module.exports = withTM({});
58 changes: 1 addition & 57 deletions src/__tests__/__apps__/basic/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions src/__tests__/__apps__/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "test-local-module",
"name": "test-basic",
"version": "1.0.0",
"description": "",
"private": "true",
"scripts": {
"dev": "cross-env NODE_PRESERVE_SYMLINKS=1 next",
"build": "cross-env NODE_PRESERVE_SYMLINKS=1 next build",
"start": "cross-env NODE_PRESERVE_SYMLINKS=1 next start"
"dev": "next",
"build": "next build",
"start": "next start"
},
"author": "Pierre de la Martinière <pierre.de.la.martiniere@gmail.com>",
"license": "MIT",
Expand All @@ -22,7 +22,6 @@
},
"devDependencies": {
"@types/react": "^16.9.23",
"@types/react-dom": "^16.9.5",
"cross-env": "^7.0.2"
"@types/react-dom": "^16.9.5"
}
}
1 change: 1 addition & 0 deletions src/__tests__/__apps__/webpack-5/pages

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/__tests__/__apps__/yarn-workspaces/_shared-ts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "shared-ts",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": ""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const add = (a: number, b: number) => a + b;
export const substract = (a: number, b: number) => a - b;
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import styles from './Button.module.css';

function Button(props) {
return (
<button
type='button'
// Note how the "error" class is accessed as a property on the imported
// `styles` object.
className={styles.error}
>
{props.children}
</button>
);
}

export default Button;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.error {
color: white;
background-color: red;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styles from './Input.module.scss';

function Input() {
return <input type='text' className={styles.input} />;
}

export default Input;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$padding: 10px;
$bg: black;
$color: white;

.input {
padding: $padding;
background-color: $bg;
color: $color;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/__tests__/__apps__/yarn-workspaces/_shared-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "shared-ui",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$background: red;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import 'variables';

body {
background-color: $background;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
background-color: black;
color: white;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$base-color: black
$border-dark: rgba($base-color, 0.88)

body
border: 1px solid $border-dark
1 change: 1 addition & 0 deletions src/__tests__/__apps__/yarn-workspaces/_shared/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const multiply = (a, b) => a * b;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 97d9f4c

Please sign in to comment.