Skip to content

Commit 572e05f

Browse files
authored
Merge branch 'v2' into semver
2 parents 511a890 + c8392be commit 572e05f

File tree

75 files changed

+619
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+619
-370
lines changed

.flowconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ untyped-import
3535
untyped-type-import
3636

3737
[version]
38-
0.150.0
38+
0.151.0

CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Please be polite and take the time to write a well-worded question so our commun
1414

1515
In order to make it easier to get familiar with the codebase we labeled simpler issues using [Good First Issue](https://github.com/parcel-bundler/parcel/issues?q=is%3Aopen+is%3Aissue+label%3A%22%E2%9C%A8+Parcel+2%22+label%3A%22%3Ababy%3A+Good+First+Issue%22) and [Help Wanted](https://github.com/parcel-bundler/parcel/issues?q=is%3Aopen+is%3Aissue+label%3A%22%E2%9C%A8+Parcel+2%22+label%3A%22%3Apray%3A+Help+Wanted%22).
1616

17-
Before starting make sure you have the following requirements installed: [git](https://git-scm.com), [Node](https://nodejs.org) and [Yarn](https://yarnpkg.com).
17+
Before starting make sure you have the following requirements installed: [git](https://git-scm.com), [Node](https://nodejs.org), [Yarn](https://yarnpkg.com) and [Rust](https://www.rust-lang.org/tools/install).
1818

1919
The process starts by [forking](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the project and setup a new branch to work in. It's important that the changes are made in separated branches in order to ensure a pull request only includes the commits related to a bug or feature.
2020

@@ -24,6 +24,7 @@ Clone the forked repository locally and install the dependencies:
2424
git clone https://github.com/USERNAME/parcel.git
2525
cd parcel
2626
yarn install
27+
yarn build-native
2728
```
2829

2930
In the folder `packages/example`, create a temporary example to debug. You can start by copying the `simple` example and try to reproduce the bug.

Cargo.lock

+38-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"cross-env": "^7.0.0",
4141
"doctoc": "^1.4.0",
4242
"eslint": "^7.20.0",
43-
"flow-bin": "0.150.0",
43+
"flow-bin": "0.151.0",
4444
"glob": "^7.1.6",
4545
"gulp": "^4.0.2",
4646
"gulp-babel": "^8.0.0",

packages/core/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@parcel/logger": "2.0.0-beta.2",
3131
"@parcel/package-manager": "2.0.0-beta.2",
3232
"@parcel/plugin": "2.0.0-beta.2",
33-
"@parcel/source-map": "2.0.0-alpha.4.21",
33+
"@parcel/source-map": "2.0.0-rc.1.0",
3434
"@parcel/types": "2.0.0-beta.2",
3535
"@parcel/utils": "2.0.0-beta.2",
3636
"@parcel/workers": "2.0.0-beta.2",

packages/core/core/src/CommittedAsset.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default class CommittedAsset {
110110
if (mapBuffer) {
111111
// Get sourcemap from flatbuffer
112112
let map = new SourceMap(this.options.projectRoot);
113-
map.addBufferMappings(mapBuffer);
113+
map.addBuffer(mapBuffer);
114114
return map;
115115
}
116116
})();

packages/core/core/src/UncommittedAsset.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export default class UncommittedAsset {
263263
if (mapBuffer) {
264264
// Get sourcemap from flatbuffer
265265
let map = new SourceMap(this.options.projectRoot);
266-
map.addBufferMappings(mapBuffer);
266+
map.addBuffer(mapBuffer);
267267
this.map = map;
268268
}
269269
}

packages/core/core/src/requests/ParcelConfigRequest.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import invariant from 'assert';
3434
import ParcelConfigSchema from '../ParcelConfig.schema';
3535
import {optionsProxy} from '../utils';
3636
import ParcelConfig from '../ParcelConfig';
37+
import {createBuildCache} from '../buildCache';
3738

3839
type ConfigMap<K, V> = {[K]: V, ...};
3940

@@ -97,12 +98,7 @@ export default function createParcelConfigRequest(): ParcelConfigRequest {
9798
};
9899
}
99100

100-
const parcelConfigCache = new Map();
101-
102-
export function clearParcelConfigCache() {
103-
parcelConfigCache.clear();
104-
}
105-
101+
const parcelConfigCache = createBuildCache();
106102
export function getCachedParcelConfig(
107103
result: ConfigAndCachePath,
108104
options: ParcelOptions,

packages/core/integration-tests/test/css.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ describe('css', () => {
304304
assert.equal(map.file, 'index.css.map');
305305
assert.equal(map.mappings, 'AAAA,OACA,WACA,CCFA,OACA,SACA');
306306
assert.deepEqual(map.sources, [
307-
'./integration/cssnano/local.css',
308-
'./integration/cssnano/index.css',
307+
'integration/cssnano/local.css',
308+
'integration/cssnano/index.css',
309309
]);
310310
});
311311

packages/core/integration-tests/test/html.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ describe('html', function() {
3939
name: 'index.html',
4040
assets: ['index.html'],
4141
},
42+
{
43+
name: 'index.html',
44+
assets: ['index.html'],
45+
},
4246
{
4347
type: 'png',
4448
assets: ['100x100.png'],
@@ -67,8 +71,7 @@ describe('html', function() {
6771
'utf8',
6872
);
6973
for (let file of files) {
70-
let ext = file.match(/\.([0-9a-z]+)(?:[?#]|$)/i)[0];
71-
if (file !== 'index.html' && ext !== '.map') {
74+
if (file !== 'index.html' && path.extname(file) !== '.map') {
7275
assert(html.includes(file));
7376
}
7477
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Foo page</title>
8+
</head>
9+
<body>
10+
<div>Some foo page...</div>
11+
</body>
12+
</html>

packages/core/integration-tests/test/integration/html/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<body>
1313
<h1>Hello world</h1>
14-
<p>Linking to <a href="other.html">another page</a></p>
14+
<p>Linking to <a href="other.html">another page</a> and <a href="foo/index.html">another page</a></p>
1515
<a href="#hash_link">Hash link</a>
1616
<a href="mailto:[email protected]">Mailto link</a>
1717
<a href="tel:+33636757575">Tel link</a>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const a = { a: 2 };
2+
3+
module.exports = <div v="1" {...a}></div>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"browserslist": "Chrome 70"
3+
}

packages/core/integration-tests/test/integration/jsx-spread/yarn.lock

Whitespace-only changes.

0 commit comments

Comments
 (0)