Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
a9baf29
Update changeset
shanshrew Jun 2, 2025
242849d
Add swc plugin support
shanshrew Aug 4, 2025
554faad
swc support
shanshrew Aug 4, 2025
433ee11
add rust support to pipelines
shanshrew Aug 4, 2025
a1073c3
Remove warnings
shanshrew Aug 4, 2025
d8d218c
Updated yaml
shanshrew Aug 4, 2025
95ca145
remove diff on .changeset/itchy-ears-try.md
shanshrew Aug 4, 2025
b47487b
update rust part of build.yml
shanshrew Aug 4, 2025
db299fd
Remove --ci flag off yarn test:cover and add it to the scripts comman…
shanshrew Aug 4, 2025
a4880f3
update visual regression.yml to include rust wasm32-wasip1 support
shanshrew Aug 4, 2025
51fb1f4
update jsx_automatic_test and expression_evaluation to ensure behavio…
shanshrew Aug 5, 2025
d568971
module_traversal tests, rule hoisting deduplication
shanshrew Aug 5, 2025
320d2cd
replicate comment preservation behaviour, fighting against swc
shanshrew Aug 5, 2025
0c9bd8a
Fix mutable variable tracking, throw in exceptional case, fix keyfram…
shanshrew Aug 5, 2025
c8c150e
Fix last remaining test issues
shanshrew Aug 5, 2025
9d30a8e
refactor swc to only support strictmode
shanshrew Aug 11, 2025
bffe720
remove .swc folder
shanshrew Aug 11, 2025
7003278
cargo toml edition
shanshrew Aug 11, 2025
694e1ef
Error on styled syntax
shanshrew Aug 17, 2025
7ca42fc
Address comments, Add sorting, deduplication, and JSDOc alterations
shanshrew Aug 19, 2025
8a75c73
babel plugin output matching swc plugin
shanshrew Aug 20, 2025
e2d176e
progress in next-gen
shanshrew Aug 20, 2025
e4ba5c0
implement xcss
shanshrew Aug 20, 2025
60985fa
progress
shanshrew Aug 22, 2025
c0bcf22
add variable support, expression support;
shanshrew Aug 22, 2025
801b37f
new hashing algo
shanshrew Aug 22, 2025
289a188
keyframes support continued, content tests added
shanshrew Aug 22, 2025
ac70283
suport writing css files to destination
shanshrew Sep 2, 2025
ee67b9c
parcel-transformer-swc tests passing
shanshrew Sep 3, 2025
3f24619
add deduplication tests
shanshrew Sep 8, 2025
0d4132e
Remove old swc-plugin, rename swc-plugin2 to swc-plugin, update refer…
shanshrew Sep 8, 2025
fe26fee
Swap tests to ESM
shanshrew Sep 8, 2025
4cf42c8
hash implementation is identical + accompanying tests
shanshrew Sep 9, 2025
e00807f
start preparing it for production - write some simple perf tests
shanshrew Sep 9, 2025
5205720
start of perf work
shanshrew Sep 9, 2025
2f74824
performance improvements
shanshrew Sep 9, 2025
943c01a
performance improvements
shanshrew Sep 9, 2025
60f5f44
Revert "performance improvements"
shanshrew Sep 9, 2025
6555bee
Revert "performance improvements"
shanshrew Sep 9, 2025
449b759
Resolve stash: keep TS test helper and converted tests post-revert; f…
shanshrew Sep 9, 2025
e8cd6bc
Revert "start of perf work"
shanshrew Sep 9, 2025
2545265
Revert "Revert "start of perf work""
shanshrew Sep 9, 2025
34a03fb
Revert "Revert "performance improvements""
shanshrew Sep 9, 2025
4dab68d
Revert "Revert "performance improvements""
shanshrew Sep 9, 2025
d08e596
Performance and hash compatability
shanshrew Sep 9, 2025
fbf10f0
update build/tests commands in monorepo root
shanshrew Sep 9, 2025
28638ad
start pipeline work
shanshrew Sep 9, 2025
118310d
resolutions order
shanshrew Sep 9, 2025
8a203ea
Get rdy for production
shanshrew Sep 10, 2025
5f3931a
Get rdy for production
shanshrew Sep 10, 2025
b49dd34
prettier
shanshrew Sep 10, 2025
c152781
Add optional chaining to css
shanshrew Sep 10, 2025
4d8db56
Minor typings changes
shanshrew Sep 10, 2025
580228b
pkg json lint
shanshrew Sep 10, 2025
2b6bb9d
yarn test fix
shanshrew Sep 10, 2025
4ce9e37
yarn test fix
shanshrew Sep 10, 2025
89dd505
Expect failure
shanshrew Sep 10, 2025
27a3489
fix parcel:test
shanshrew Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ jobs:
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1

- name: Verify Rust targets
run: |
rustup target list --installed
rustup target add wasm32-wasip1 --toolchain stable

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1

- name: Install Dependencies
run: yarn

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand Down Expand Up @@ -60,7 +65,7 @@ jobs:
# Needs to run after `yarn build` so that `packages/webpack-loader/`
# tests can resolve `@compiled/react/runtime` correctly.
- name: Run tests
run: yarn test:cover --ci
run: yarn test:cover

- name: Run import test
run: yarn test:imports
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/visual-regression-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ jobs:
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1

- name: Verify Rust targets
run: |
rustup target list --installed
rustup target add wasm32-wasip1 --toolchain stable

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ storybook-static

*.log
*.tsbuildinfo

.swc/
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ coverage
dist
storybook-static
**/__fixtures__/*.css
# Build artifacts and caches
**/dist/
**/target/
.parcel-cache/
**/.parcel-cache/
packages/swc-plugin/target/
6 changes: 6 additions & 0 deletions fixtures/parcel-transformer-swc-test-app/.compiledcssrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"importReact": false,
"extract": false,
"optimizeCss": false,
"swc": "auto"
}
10 changes: 10 additions & 0 deletions fixtures/parcel-transformer-swc-test-app/.parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{js,jsx}": [
"@compiled/parcel-transformer-external",
"@compiled/parcel-transformer-swc",
"..."
]
}
}
68 changes: 68 additions & 0 deletions fixtures/parcel-transformer-swc-test-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# @compiled/parcel-transformer-test-app

## 0.1.6

### Patch Changes

- Updated dependencies [9a15e742]
- @compiled/[email protected]

## 0.1.5

### Patch Changes

- Updated dependencies [4b2e5eeb]
- Updated dependencies [39d9a02c]
- Updated dependencies [20528e91]
- Updated dependencies [5701b914]
- @compiled/[email protected]

## 0.1.4

### Patch Changes

- Updated dependencies [f8d01fa2]
- @compiled/[email protected]

## 0.1.3

### Patch Changes

- Updated dependencies [b6f3e41e]
- @compiled/[email protected]

## 0.1.2

### Patch Changes

- Updated dependencies [4a2174c5]
- Updated dependencies [c5377cdb]
- @compiled/[email protected]

## 0.1.1

### Patch Changes

- Updated dependencies [c4e6b7c0]
- Updated dependencies [c4e6b7c0]
- @compiled/[email protected]

## 0.1.0

### Minor Changes

- a41e41e6: Update monorepo node version to v18, and drop support for node v12

### Patch Changes

- Updated dependencies [a41e41e6]
- Updated dependencies [f9c957ef]
- @compiled/[email protected]

## 0.0.2

### Patch Changes

- Updated dependencies [ad4d257]
- Updated dependencies [1cab89a]
- @compiled/[email protected]
14 changes: 14 additions & 0 deletions fixtures/parcel-transformer-swc-test-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@compiled/parcel-transformer-swc-test-app",
"version": "0.1.6",
"private": true,
"dependencies": {
"@compiled/react": "^0.18.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@compiled/parcel-transformer": "*",
"@parcel/config-default": "^2.8.3"
}
}
11 changes: 11 additions & 0 deletions fixtures/parcel-transformer-swc-test-app/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./index.jsx"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions fixtures/parcel-transformer-swc-test-app/src/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
console.log('File START');

import { css } from '@compiled/react';

const styles = css({ backgroundColor: 'green' });

const App = () => (
<>
<div css={[{ fontSize: 50, color: 'red' }, styles]}>hello from parcel</div>
</>
);

console.log('File END');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"importReact": false,
"extract": true,
"optimizeCss": false,
"inlineCss": true,
"swc": "auto",
}
16 changes: 16 additions & 0 deletions fixtures/parcel-transformer-swc-test-extract-app/.parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{js,jsx}": [
"@compiled/parcel-transformer-external",
"@compiled/parcel-transformer-swc",
"..."
]
},
"optimizers": {
"*.html": [
"@compiled/parcel-optimizer",
"..."
]
}
}
78 changes: 78 additions & 0 deletions fixtures/parcel-transformer-swc-test-extract-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# @compiled/parcel-transformer-test-extract-app

## 0.1.6

### Patch Changes

- Updated dependencies [9a15e742]
- @compiled/[email protected]

## 0.1.5

### Patch Changes

- Updated dependencies [4b2e5eeb]
- Updated dependencies [39d9a02c]
- Updated dependencies [20528e91]
- Updated dependencies [5701b914]
- @compiled/[email protected]

## 0.1.4

### Patch Changes

- Updated dependencies [f8d01fa2]
- @compiled/[email protected]

## 0.1.3

### Patch Changes

- Updated dependencies [b6f3e41e]
- @compiled/[email protected]

## 0.1.2

### Patch Changes

- Updated dependencies [4a2174c5]
- Updated dependencies [c5377cdb]
- @compiled/[email protected]

## 0.1.1

### Patch Changes

- Updated dependencies [c4e6b7c0]
- Updated dependencies [c4e6b7c0]
- @compiled/[email protected]

## 0.1.0

### Minor Changes

- a41e41e6: Update monorepo node version to v18, and drop support for node v12

### Patch Changes

- Updated dependencies [a41e41e6]
- Updated dependencies [f9c957ef]
- @compiled/[email protected]

## 0.0.3

### Patch Changes

- 966a1080: Changed the approach of stylesheet extraction on Parcel

- @compiled/parcel-resolver is no longer used
- Pass styleRules to optimizer via metadata
- Optimizer then collects styleRules, and inserts it to output HTML

## 0.0.2

### Patch Changes

- Updated dependencies [ad4d257]
- Updated dependencies [1cab89a]
- @compiled/[email protected]

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

17 changes: 17 additions & 0 deletions fixtures/parcel-transformer-swc-test-extract-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@compiled/parcel-transformer-swc-test-extract-app",
"version": "0.1.6",
"private": true,
"dependencies": {
"@compiled/react": "^0.18.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@compiled/babel-component-extracted-fixture": "*",
"@compiled/babel-component-fixture": "*",
"@compiled/parcel-transformer": "*",
"@compiled/parcel-transformer-external": "*",
"@parcel/config-default": "^2.8.3"
}
}
Empty file.
11 changes: 11 additions & 0 deletions fixtures/parcel-transformer-swc-test-extract-app/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./index.jsx"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions fixtures/parcel-transformer-swc-test-extract-app/src/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import BabelComponentExtracted from '@compiled/babel-component-extracted-fixture/dist/index';
import BabelComponent from '@compiled/babel-component-fixture';
import { css } from '@compiled/react';

import { GREEN } from './colors';

const App = () => (
<>
<div css={css({ fontSize: 50, color: GREEN })}>CSS prop</div>
<BabelComponent>Babel component</BabelComponent>
<BabelComponentExtracted>Component from NPM</BabelComponentExtracted>
</>
);
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
projects: ['<rootDir>/jest.config.json', '<rootDir>/packages/swc-plugin/jest.config.js'],
};
Loading
Loading