Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: atlassian-labs/compiled
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @compiled/react@0.11.1
Choose a base ref
...
head repository: atlassian-labs/compiled
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @compiled/react@0.11.2
Choose a head ref

Commits on Oct 25, 2022

  1. Copy the full SHA
    bfb14e2 View commit details

Commits on Nov 1, 2022

  1. update babel-plugin-strip-runtime to pass styleRules to meta, update … (

    #1303)
    
    * update babel-plugin-strip-runtime to pass styleRules to meta, update parcel-transformer to add styleRules to meta, create a new package parcel-optimizer-html-inline-css
    
    * Revert package.json
    
    * sort package.json
    
    * type change, tests, and bundle the styleRules from bundles that HTML is entry for
    
    * test parcel-optimizer
    
    * Update parcel-transformer test
    
    * Add option to inline css
    
    * Add missing type file
    
    * Remove parcel-resolver
    
    * add changeset
    
    * Update the wording of changeset
    
    * Force stylesheet to be off on parcel local development
    
    * Change inlineCSS to inlineCss to be consistent with optimizeCss
    
    * bugfix parcel transformer parse
    
    Co-authored-by: Liam Ma <lma2@atlassian.com>
    liamqma and AtlassianRubberDuck authored Nov 1, 2022
    Copy the full SHA
    966a108 View commit details
  2. Version Packages (#1307)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    atlas-dst-bot and github-actions[bot] authored Nov 1, 2022
    Copy the full SHA
    c7a7506 View commit details

Commits on Nov 3, 2022

  1. fix(eslint-plugin): handle importing whole modules (#1308)

    Co-authored-by: Mustafa Mansour <mmansour@atlassian.com>
    MkMan and Mustafa Mansour authored Nov 3, 2022
    Copy the full SHA
    c837153 View commit details
  2. Version Packages (#1309)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    atlas-dst-bot and github-actions[bot] authored Nov 3, 2022
    Copy the full SHA
    6bfac94 View commit details

Commits on Nov 7, 2022

  1. [Snyk] Security upgrade loader-utils from 2.0.2 to 2.0.3 (#1310)

    * fix: packages/webpack-loader/package.json to reduce vulnerabilities
    
    The following vulnerabilities are fixed with an upgrade:
    - https://snyk.io/vuln/SNYK-JS-LOADERUTILS-3043105
    
    * Add changeset
    
    Co-authored-by: snyk-bot <snyk-bot@snyk.io>
    Co-authored-by: Jack Brown <jbrown2@atlassian.com>
    3 people authored Nov 7, 2022
    Copy the full SHA
    3cb750a View commit details
  2. Version Packages (#1311)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    atlas-dst-bot and github-actions[bot] authored Nov 7, 2022
    Copy the full SHA
    c0ca21a View commit details

Commits on Nov 22, 2022

  1. Add Type support to no-styled-tagged-template-expression ESLint rule (#…

    …1315)
    
    * Add Type support to no-styled-tagged-template-expression ESLint rule
    
    * prettier
    
    * Use public registry
    
    * Add changeset
    
    Co-authored-by: Liam Ma <lma2@atlassian.com>
    liamqma and AtlassianRubberDuck authored Nov 22, 2022
    Copy the full SHA
    10533c7 View commit details
  2. Version Packages (#1318)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    atlas-dst-bot and github-actions[bot] authored Nov 22, 2022
    Copy the full SHA
    7573b74 View commit details
  3. fix breaking rule (#1313)

    * fix breaking rule
    
    * add changeset
    
    * feedbacks
    pancaspe87 authored Nov 22, 2022
    Copy the full SHA
    6298720 View commit details

Commits on Nov 23, 2022

  1. Version Packages (#1319)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    atlas-dst-bot and github-actions[bot] authored Nov 23, 2022
    Copy the full SHA
    4021156 View commit details

Commits on Nov 27, 2022

  1. fix an issue of double call expression in traverseCallExpression (#1320)

    * fix an issue of double call expression in traverseCallExpression
    
    * Add changeset
    
    Co-authored-by: Liam Ma <lma2@atlassian.com>
    liamqma and AtlassianRubberDuck authored Nov 27, 2022
    Copy the full SHA
    99af4aa View commit details
  2. Use 0% as default value for flex-basis (#1317)

    * Use 0% as default value for flex-basis
    
    * Fix snapshot test
    
    * Fix snapshot test
    
    * Add changeset
    
    Co-authored-by: Liam Ma <lma2@atlassian.com>
    liamqma and AtlassianRubberDuck authored Nov 27, 2022
    Copy the full SHA
    8a74fcd View commit details
  3. Version Packages (#1322)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    atlas-dst-bot and github-actions[bot] authored Nov 27, 2022
    Copy the full SHA
    e55bc44 View commit details

Commits on Nov 29, 2022

  1. fix: upgrade jscodeshift from 0.13.1 to 0.14.0 (#1305)

    Snyk has created this PR to upgrade jscodeshift from 0.13.1 to 0.14.0.
    
    See this package in npm:
    https://www.npmjs.com/package/jscodeshift
    
    See this project in Snyk:
    https://app.snyk.io/org/engineering-container-scanning/project/1591c2ef-1ec9-4a0a-9843-615ca2a55191?utm_source=github&utm_medium=referral&page=upgrade-pr
    
    Co-authored-by: Jake Lane <jlane2@atlassian.com>
    snyk-bot and JakeLane authored Nov 29, 2022
    Copy the full SHA
    79e3e87 View commit details

Commits on Dec 6, 2022

  1. Fix value wrapped by quote (#1327)

    * fix eslint value wrapped by quote
    
    * prettier
    
    * Add changeset
    
    Co-authored-by: Liam Ma <lma2@atlassian.com>
    liamqma and AtlassianRubberDuck authored Dec 6, 2022
    Copy the full SHA
    de28378 View commit details

Commits on Dec 7, 2022

  1. [ESLint] Selector disappears when autofixing no-*-tagged-template-exp… (

    #1326)
    
    * [ESLint] Selector disappears when autofixing no-*-tagged-template-expression
    
    * Add changeset
    
    * prettier
    
    * Update packages/eslint-plugin/src/utils/create-no-tagged-template-expression-rule/generate.ts
    
    Fixed typo
    
    Co-authored-by: Jake Lane <jlane2@atlassian.com>
    
    * Update .changeset/olive-numbers-occur.md
    
    Fixed typo in changeset description
    
    Co-authored-by: Jake Lane <jlane2@atlassian.com>
    
    * Restore line breaks in the test
    
    Co-authored-by: Liam Ma <lma2@atlassian.com>
    Co-authored-by: Jake Lane <jlane2@atlassian.com>
    3 people authored Dec 7, 2022
    Copy the full SHA
    72187dc View commit details
  2. Version Packages (#1328)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    atlas-dst-bot and github-actions[bot] authored Dec 7, 2022
    Copy the full SHA
    e861648 View commit details
  3. chore(deps): update dependency @changesets/cli to ^2.25.2 (#1330)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 7, 2022
    Copy the full SHA
    1e774ae View commit details
  4. Bug/fix Webpack plugin extraction error (#1329)

    * Add check for webpack loader path in extraction behaviour
    
    * Add post install script for fixing yarn.lock
    
    * Add changeset
    JakeLane authored Dec 7, 2022
    Copy the full SHA
    33d6621 View commit details

Commits on Dec 9, 2022

  1. Fix/1316 CSS prop (#1321)

    * fix: handle member expression in css prop
    
    * fix: handle CSS call expression with member expressions
    
    * fix types
    
    * fix: types
    
    * fix: esnure also aliases are handled
    
    * revert changes - not needed
    
    * add changeset
    
    Co-authored-by: Celeste Carloni <ccarloni@atlassian.com>
    Co-authored-by: Jake Lane <jlane2@atlassian.com>
    3 people authored Dec 9, 2022
    Copy the full SHA
    14f2091 View commit details

Commits on Dec 12, 2022

  1. chore(deps): update dependency prettier to ^2.8.1 (#1335)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 12, 2022
    Copy the full SHA
    14ba957 View commit details
  2. chore(deps): update dependency storybook-addon-pseudo-states to ^1.15…

    ….1 (#1336)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 12, 2022
    Copy the full SHA
    f89687d View commit details
  3. chore(deps): update dependency flowgen to ^1.20.1 (#1338)

    * chore(deps): update dependency flowgen to ^1.20.1
    
    * Migrate to flowgen v1.20.1
    
    * Add changeset
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Jake Lane <jlane2@atlassian.com>
    renovate[bot] and JakeLane authored Dec 12, 2022
    Copy the full SHA
    08a963f View commit details

Commits on Dec 16, 2022

  1. Add component name to class name (#1340)

    * Not hash atomic class name and add component name to class name
    
    * add Plugin option: 'addComponentName'
    
    * refactor packages/babel-plugin/src/utils/build-styled-component.ts
    
    * Add comments
    
    * prettier
    
    * changeset
    
    * Add option 'addComponentName' to Parcel and Webpack
    
    * prettier
    
    Co-authored-by: Liam Ma <lma2@atlassian.com>
    liamqma and AtlassianRubberDuck authored Dec 16, 2022
    Copy the full SHA
    50b5172 View commit details

Commits on Dec 19, 2022

  1. Copy the full SHA
    5e856e8 View commit details
  2. Fix/1324 no exported css reference (#1339)

    * use constant for COMPILED_IMPORT
    
    * fix: allow exporting components with css references
    
    * add changeset
    
    * fix: added test as per feedback
    
    * address extra test case as per feedback
    
    Co-authored-by: Celeste Carloni <ccarloni@atlassian.com>
    Co-authored-by: Jake Lane <jlane2@atlassian.com>
    3 people authored Dec 19, 2022
    Copy the full SHA
    8acf1e2 View commit details

Commits on Dec 20, 2022

  1. Version Packages (#1332)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    atlas-dst-bot and github-actions[bot] authored Dec 20, 2022
    Copy the full SHA
    821e151 View commit details
Showing with 2,058 additions and 1,800 deletions.
  1. +1 −5 examples/parcel/.parcelrc
  2. +10 −0 examples/parcel/CHANGELOG.md
  3. +1 −1 examples/parcel/package.json
  4. +5 −0 examples/parcel/src/app.jsx
  5. +8 −0 examples/parcel/src/async.jsx
  6. +0 −2 examples/parcel/tsconfig.json
  7. +4 −0 fixtures/parcel-optimizer-test-app/.compiledcssrc
  8. +7 −2 fixtures/parcel-optimizer-test-app/.parcelrc
  9. +11 −0 fixtures/parcel-optimizer-test-app/CHANGELOG.md
  10. +1 −0 fixtures/parcel-optimizer-test-app/package-lock.json
  11. +2 −1 fixtures/parcel-optimizer-test-app/package.json
  12. +1 −2 fixtures/parcel-optimizer-test-app/src/index.html
  13. +0 −1 fixtures/parcel-optimizer-test-app/src/index.js
  14. +40 −0 fixtures/parcel-optimizer-test-app/src/index.jsx
  15. +0 −32 fixtures/parcel-optimizer-test-app/src/styles.css
  16. +0 −68 fixtures/parcel-resolver-alias/CHANGELOG.md
  17. +0 −15 fixtures/parcel-resolver-alias/package.json
  18. +0 −17 fixtures/parcel-resolver-alias/src/index.ts
  19. +0 −10 fixtures/parcel-resolver-alias/tsconfig.json
  20. +0 −12 fixtures/parcel-resolver-noop/package.json
  21. +0 −15 fixtures/parcel-resolver-noop/src/index.ts
  22. +0 −9 fixtures/parcel-resolver-noop/tsconfig.json
  23. +0 −7 fixtures/parcel-resolver-test-app/.parcelrc
  24. +0 −9 fixtures/parcel-resolver-test-app/package.json
  25. +0 −11 fixtures/parcel-resolver-test-app/src/index.html
  26. +0 −1 fixtures/parcel-resolver-test-app/src/index.js
  27. +2 −1 fixtures/parcel-transformer-test-extract-app/.compiledcssrc
  28. +3 −1 fixtures/parcel-transformer-test-extract-app/.parcelrc
  29. +10 −0 fixtures/parcel-transformer-test-extract-app/CHANGELOG.md
  30. +1 −2 fixtures/parcel-transformer-test-extract-app/package.json
  31. +5 −9 package.json
  32. +16 −0 packages/babel-plugin-strip-runtime/CHANGELOG.md
  33. +2 −2 packages/babel-plugin-strip-runtime/package.json
  34. +80 −4 packages/babel-plugin-strip-runtime/src/__tests__/strip-runtime-source-code.test.ts
  35. +13 −4 packages/babel-plugin-strip-runtime/src/index.ts
  36. +15 −0 packages/babel-plugin-strip-runtime/src/types.ts
  37. +17 −2 packages/babel-plugin/CHANGELOG.md
  38. +3 −3 packages/babel-plugin/package.json
  39. +14 −0 packages/babel-plugin/src/__fixtures__/mixins/alias.js
  40. +27 −0 packages/babel-plugin/src/__fixtures__/mixins/objects.js
  41. +10 −0 packages/babel-plugin/src/__tests__/expression-evaluation.test.ts
  42. +15 −0 packages/babel-plugin/src/__tests__/index.test.ts
  43. +45 −0 packages/babel-plugin/src/__tests__/module-traversal.test.ts
  44. +64 −0 packages/babel-plugin/src/css-prop/__tests__/object-literal.test.ts
  45. +31 −0 packages/babel-plugin/src/styled/__tests__/call-expression.test.ts
  46. +11 −0 packages/babel-plugin/src/types.ts
  47. +14 −2 packages/babel-plugin/src/utils/build-styled-component.ts
  48. +6 −1 packages/babel-plugin/src/utils/css-builders.ts
  49. +1 −1 packages/babel-plugin/src/utils/is-compiled.ts
  50. +4 −1 packages/babel-plugin/src/utils/resolve-binding.ts
  51. +15 −2 packages/babel-plugin/src/utils/traverse-expression/traverse-call-expression.ts
  52. +6 −0 ...s/traverse-expression/traverse-member-expression/traverse-access-path/resolve-expression/index.ts
  53. +1 −0 packages/babel-plugin/src/utils/traversers/index.ts
  54. +32 −0 packages/babel-plugin/src/utils/traversers/set-imported-compiled-imports.ts
  55. +0 −126 packages/cli/CHANGELOG.md
  56. +0 −19 packages/cli/README.md
  57. +0 −44 packages/cli/package.json
  58. +0 −119 packages/cli/src/__tests__/main.test.ts
  59. +0 −3 packages/cli/src/__tests__/test-utils.ts
  60. +0 −33 packages/cli/src/cli.ts
  61. +0 −18 packages/cli/src/index.ts
  62. +0 −36 packages/cli/src/main.ts
  63. +0 −3 packages/cli/src/presets/codemods/README.md
  64. +0 −205 packages/cli/src/presets/codemods/__tests__/codemods.test.ts
  65. +0 −100 packages/cli/src/presets/codemods/codemods.ts
  66. +0 −1 packages/cli/src/presets/codemods/index.ts
  67. +0 −19 packages/cli/src/presets/codemods/types.ts
  68. +0 −55 packages/cli/src/presets/codemods/utils/__tests__/transforms.test.ts
  69. +0 −31 packages/cli/src/presets/codemods/utils/transforms.ts
  70. +0 −12 packages/cli/src/presets/index.ts
  71. +0 −9 packages/cli/tsconfig.json
  72. +0 −20 packages/cli/types/enquirer.d.ts
  73. +0 −23 packages/cli/types/exec-sh.d.ts
  74. +13 −0 packages/codemods/README.md
  75. +1 −1 packages/codemods/package.json
  76. +7 −15 packages/codemods/src/transforms/emotion-to-compiled/README.md
  77. +7 −15 packages/codemods/src/transforms/styled-components-inner-ref-to-ref/README.md
  78. +7 −15 packages/codemods/src/transforms/styled-components-to-compiled/README.md
  79. +6 −0 packages/css/CHANGELOG.md
  80. +1 −1 packages/css/package.json
  81. +1 −1 packages/css/src/__tests__/transform.test.ts
  82. +136 −114 packages/css/src/plugins/expand-shorthands/__tests__/flex.test.ts
  83. +7 −2 packages/css/src/plugins/expand-shorthands/flex.ts
  84. +33 −0 packages/eslint-plugin/CHANGELOG.md
  85. +3 −2 packages/eslint-plugin/package.json
  86. +27 −0 packages/eslint-plugin/src/rules/no-css-tagged-template-expression/__tests__/rule.test.ts
  87. +1 −0 packages/eslint-plugin/src/rules/no-emotion-css/__tests__/rule.test.ts
  88. +2 −2 packages/eslint-plugin/src/rules/no-emotion-css/index.ts
  89. +52 −0 packages/eslint-plugin/src/rules/no-exported-css/__tests__/rule.test.ts
  90. +27 −0 packages/eslint-plugin/src/rules/no-keyframes-tagged-template-expression/__tests__/rule.test.ts
  91. +278 −2 packages/eslint-plugin/src/rules/no-styled-tagged-template-expression/__tests__/rule.test.ts
  92. +3 −1 packages/eslint-plugin/src/rules/no-styled-tagged-template-expression/utils.ts
  93. +19 −1 packages/eslint-plugin/src/test-utils.ts
  94. +1 −1 packages/eslint-plugin/src/utils/ast.ts
  95. +1 −0 packages/eslint-plugin/src/utils/constants.ts
  96. +3 −1 packages/eslint-plugin/src/utils/create-no-exported-rule/index.ts
  97. +76 −0 packages/eslint-plugin/src/utils/create-no-exported-rule/is-styled-component.ts
  98. +10 −0 packages/eslint-plugin/src/utils/create-no-exported-rule/validate-definition.ts
  99. +8 −1 packages/eslint-plugin/src/utils/create-no-tagged-template-expression-rule/generate.ts
  100. +36 −7 packages/eslint-plugin/src/utils/create-no-tagged-template-expression-rule/index.ts
  101. +36 −2 packages/eslint-plugin/src/utils/create-no-tagged-template-expression-rule/to-arguments.ts
  102. +3 −1 packages/eslint-plugin/src/utils/is-css.ts
  103. +3 −1 packages/eslint-plugin/src/utils/is-keyframes.ts
  104. +6 −0 packages/jest/CHANGELOG.md
  105. +1 −1 packages/jest/package.json
  106. +1 −2 packages/jest/src/index.js.flow
  107. +1 −3 packages/jest/src/matchers.js.flow
  108. +1 −2 packages/jest/src/types.js.flow
  109. +16 −0 packages/parcel-config/CHANGELOG.md
  110. +2 −3 packages/parcel-config/config.json
  111. +3 −4 packages/parcel-config/package.json
  112. +16 −0 packages/parcel-optimizer/CHANGELOG.md
  113. +6 −2 packages/parcel-optimizer/package.json
  114. +22 −15 packages/parcel-optimizer/src/__tests__/optimizer.parceltest.ts
  115. +103 −3 packages/parcel-optimizer/src/index.ts
  116. +7 −0 packages/parcel-optimizer/src/types.ts
  117. +0 −7 packages/parcel-resolver/CHANGELOG.md
  118. +0 −13 packages/parcel-resolver/README.md
  119. +0 −32 packages/parcel-resolver/package.json
  120. +0 −36 packages/parcel-resolver/src/__tests__/resolver.parceltest.ts
  121. +0 −24 packages/parcel-resolver/src/index.ts
  122. +0 −15 packages/parcel-resolver/tsconfig.json
  123. +33 −0 packages/parcel-transformer/CHANGELOG.md
  124. +5 −4 packages/parcel-transformer/package.json
  125. +65 −39 packages/parcel-transformer/src/__tests__/transformer.parceltest.ts
  126. +19 −7 packages/parcel-transformer/src/index.ts
  127. +7 −0 packages/parcel-transformer/src/types.ts
  128. +0 −1 packages/parcel-transformer/tsconfig.json
  129. +7 −2 packages/react/CHANGELOG.md
  130. +1 −1 packages/react/package.json
  131. +1 −2 packages/react/src/class-names/index.js.flow
  132. +1 −1 packages/react/src/css/index.js.flow
  133. +1 −1 packages/react/src/index.js.flow
  134. +1 −1 packages/react/src/keyframes/index.js.flow
  135. +1 −1 packages/react/src/runtime.js.flow
  136. +1 −1 packages/react/src/runtime/ax.js.flow
  137. +1 −1 packages/react/src/runtime/cache.js.flow
  138. +1 −1 packages/react/src/runtime/css-custom-property.js.flow
  139. +1 −1 packages/react/src/runtime/dev-warnings.js.flow
  140. +1 −1 packages/react/src/runtime/index.js.flow
  141. +1 −1 packages/react/src/runtime/is-server-environment.js.flow
  142. +1 −1 packages/react/src/runtime/sheet.js.flow
  143. +1 −1 packages/react/src/runtime/style-cache.js.flow
  144. +1 −2 packages/react/src/runtime/style.js.flow
  145. +1 −1 packages/react/src/runtime/types.js.flow
  146. +1 −1 packages/react/src/styled/index.js.flow
  147. +1 −2 packages/react/src/types.js.flow
  148. +1 −1 packages/react/src/utils/error.js.flow
  149. +0 −2 packages/tsconfig.json
  150. +34 −0 packages/webpack-loader/CHANGELOG.md
  151. +6 −6 packages/webpack-loader/package.json
  152. +8 −0 packages/webpack-loader/src/__tests__/extract-plugin.test.ts
  153. +7 −1 packages/webpack-loader/src/__tests__/test-utils.ts
  154. +5 −0 packages/webpack-loader/src/compiled-loader.ts
  155. +7 −0 packages/webpack-loader/src/types.ts
  156. +5 −1 packages/webpack-loader/src/utils.ts
  157. +0 −23 scripts/generate-renovate-changeset.ts
  158. +20 −0 scripts/postinstall.sh
  159. +0 −1 tsconfig.paths.json
  160. +264 −212 yarn.lock
6 changes: 1 addition & 5 deletions examples/parcel/.parcelrc
Original file line number Diff line number Diff line change
@@ -16,9 +16,5 @@
"@parcel/transformer-react-refresh-wrap",
"..."
]
},
"resolvers": [
"@compiled/parcel-resolver-alias",
"..."
]
}
}
10 changes: 10 additions & 0 deletions examples/parcel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @compiled/parcel-app

## 1.1.6

### 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

## 1.1.5

### Patch Changes
2 changes: 1 addition & 1 deletion examples/parcel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@compiled/parcel-app",
"version": "1.1.5",
"version": "1.1.6",
"private": true,
"scripts": {
"build": "parcel build ./src/index.html",
5 changes: 5 additions & 0 deletions examples/parcel/src/app.jsx
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@ import {
} from './ui/custom-file-extension.customjsx';
import { TypeScript } from './ui/typescript';

const AsyncComponent = React.lazy(() => import('./async'));

export const App = () => (
<>
<div css={{ fontSize: 50, color: primary }}>hello from parcel 2</div>
@@ -24,5 +26,8 @@ export const App = () => (
<CustomFileExtensionStyled>Custom File Extension Styled</CustomFileExtensionStyled>
<div css={customFileExtensionCss}>Custom File Extension CSS</div>
<Annotated />
<React.Suspense fallback={<div>Loading...</div>}>
<AsyncComponent />
</React.Suspense>
</>
);
8 changes: 8 additions & 0 deletions examples/parcel/src/async.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as React from 'react';
import '@compiled/react';

export default Async = () => (
<>
<div css={{ fontSize: 50, color: 'red' }}>hello from async component</div>
</>
);
2 changes: 0 additions & 2 deletions examples/parcel/tsconfig.json
Original file line number Diff line number Diff line change
@@ -5,9 +5,7 @@
},
"include": ["**/*.tsx", "**/*.ts"],
"references": [
{ "path": "../../fixtures/parcel-resolver-alias/tsconfig.json" },
{ "path": "../../packages/parcel-optimizer/tsconfig.json" },
{ "path": "../../packages/parcel-resolver/tsconfig.json" },
{ "path": "../../packages/parcel-transformer/tsconfig.json" },
{ "path": "../../packages/react/tsconfig.browser.json" }
]
4 changes: 4 additions & 0 deletions fixtures/parcel-optimizer-test-app/.compiledcssrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extract": true,
"inlineCss": true
}
9 changes: 7 additions & 2 deletions fixtures/parcel-optimizer-test-app/.parcelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"extends": "@parcel/config-default",
"extends": [
"@parcel/config-default"
],
"transformers": {
"*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": ["@compiled/parcel-transformer", "..."]
},
"optimizers": {
"*.css": ["@compiled/parcel-optimizer", "..."]
"*.html": ["@compiled/parcel-optimizer", "..."]
}
}
11 changes: 11 additions & 0 deletions fixtures/parcel-optimizer-test-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# @compiled/parcel-optimizer-test-app

## 0.0.2

### 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
1 change: 1 addition & 0 deletions fixtures/parcel-optimizer-test-app/package-lock.json

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

3 changes: 2 additions & 1 deletion fixtures/parcel-optimizer-test-app/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "@compiled/parcel-optimizer-test-app",
"version": "0.0.1",
"version": "0.0.2",
"private": true,
"dependencies": {
"@compiled/react": "^0.11.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
3 changes: 1 addition & 2 deletions fixtures/parcel-optimizer-test-app/src/index.html
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
</head>
<body>
<div id="root"></div>
<link rel="stylesheet" href="./styles.css" />
<script type="module" src="./index.js"></script>
<script type="module" src="./index.jsx"></script>
</body>
</html>
1 change: 0 additions & 1 deletion fixtures/parcel-optimizer-test-app/src/index.js

This file was deleted.

40 changes: 40 additions & 0 deletions fixtures/parcel-optimizer-test-app/src/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { styled } from '@compiled/react';
import * as React from 'react';

const ComponentA = styled.div({
color: 'red',
':hover': {
color: 'green',
},
':focus': {
color: 'orange',
},
});

const ComponentB = styled.div({
'@media screen': {
color: 'red',
},
});

const ComponentC = styled.div({
'@media (min-width: 500px)': {
border: '2px solid red',
},
});

const ComponentD = styled.div({
'@media (min-width: 500px)': {
border: '2px solid red',
content: 'large screen',
},
});

const App = () => (
<>
<ComponentA />
<ComponentB />
<ComponentC />
<ComponentD />
</>
);
32 changes: 0 additions & 32 deletions fixtures/parcel-optimizer-test-app/src/styles.css

This file was deleted.

68 changes: 0 additions & 68 deletions fixtures/parcel-resolver-alias/CHANGELOG.md

This file was deleted.

15 changes: 0 additions & 15 deletions fixtures/parcel-resolver-alias/package.json

This file was deleted.

17 changes: 0 additions & 17 deletions fixtures/parcel-resolver-alias/src/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions fixtures/parcel-resolver-alias/tsconfig.json

This file was deleted.

12 changes: 0 additions & 12 deletions fixtures/parcel-resolver-noop/package.json

This file was deleted.

15 changes: 0 additions & 15 deletions fixtures/parcel-resolver-noop/src/index.ts

This file was deleted.

9 changes: 0 additions & 9 deletions fixtures/parcel-resolver-noop/tsconfig.json

This file was deleted.

7 changes: 0 additions & 7 deletions fixtures/parcel-resolver-test-app/.parcelrc

This file was deleted.

9 changes: 0 additions & 9 deletions fixtures/parcel-resolver-test-app/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions fixtures/parcel-resolver-test-app/src/index.html

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/parcel-resolver-test-app/src/index.js

This file was deleted.

3 changes: 2 additions & 1 deletion fixtures/parcel-transformer-test-extract-app/.compiledcssrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"importReact": false,
"extract": true,
"optimizeCss": false
"optimizeCss": false,
"inlineCss": true
}
Loading