Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to change this? I figure we're not actually using this for CI?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we can delete this since we aren't using codesandbox

"node": "14",
"node": "20",
"packages": ["packages/core", "packages/react"],
"sandboxes": ["7njqn", "2uwsq"]
}
18 changes: 13 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
name: CI
on: push
on:
push:
branches:
- canary

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we still using this branch?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will not be using it actively, but since this is the branch our fork is based off of, we should keep it just in case we need to pull in changes from upstream

- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable && yarn --version
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
cache: 'yarn'
- name: Install modules
run: yarn
run: yarn install --immutable
- name: Run tests
run: yarn test
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
package-lock.json
yarn.lock
*.pid
*.seed
*.pid.lock
Expand Down Expand Up @@ -71,8 +69,13 @@ typings/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity
# Yarn 4 files
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# dotenv environment variables file
.env
Expand Down
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.17.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also just curious, why do we need a node version for this package?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this just ensures consistency across builds by ensuring all builds were generated using the same tooling

18 changes: 6 additions & 12 deletions .task/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ const main = async () => {

const state = {}

const q1option = new Set(['major', 'minor', 'patch', 'prerelease'])
const q1option = new Set(['major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease'])

state.release = await rl.question(`Release Type ${co.dim('(major, minor, patch, prerelease)')}:`)
state.npmtag = state.release === 'prerelease' ? 'canary' : 'latest'
state.release = await rl.question(`Release Type ${co.dim('(major, minor, patch, premajor, preminor, prepatch, prerelease)')}:`)
state.npmtag = state.release.startsWith('pre') ? 'canary' : 'latest'

if (!q1option.has(state.release)) return

await cp.spawn('npm', ['version', state.release, '--workspaces'], { stdio: 'pipe' })
await cp.spawn('yarn', ['workspaces', 'foreach', '-A', 'version', state.release, '--immediate'], { stdio: 'pipe' })

const workspacepkgpaths = new Set
const workspacetags = new Set
Expand Down Expand Up @@ -46,22 +46,16 @@ const main = async () => {
return
}

await cp.spawn('npm', ['run', 'build'], { stdio: 'ignore' })

state.otp = await rl.question(`OTP:`)

if (!state.otp) return
await cp.spawn('yarn', ['build'], { stdio: 'ignore' })

for (const workspacepkgpath of workspacepkgpaths) {
await cp.spawn('git', ['add', workspacepkgpath.ospathname])
}

await cp.spawn('git', ['commit', '-m', state.version])
await cp.spawn('git', ['tag', state.version])
await cp.spawn('git', ['push'])
await cp.spawn('git', ['push', '--tags'])

await cp.spawn('npm', ['publish', '--tag', state.npmtag, '--workspaces', '--otp', state.otp])
await cp.spawn('yarn', ['workspaces', 'foreach', '-A', '--no-private', 'npm', 'publish', '--tag', state.npmtag])
}

main()
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"editor.snippetSuggestions": "none",
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.wordBasedSuggestions": false,
"editor.wordBasedSuggestions": "off",
"emmet.showAbbreviationSuggestions": false,
"emmet.showExpandedAbbreviation": "never",
"files.exclude": {
Expand Down
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

compressionLevel: 0
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
"name": "stitches",
"type": "module",
"license": "MIT",
"packageManager": "[email protected]",
"contributors": [
"Pedro Duarte",
"Abdulhadi Alhallak <[email protected]>",
"Jonathan Neal"
],
"scripts": {
"build:test:types": "yarn workspace @stitches/test build",
"build:test:types": "yarn workspace @sigmacomputing/stitches-test build",
"build": "node .task/build.js",
"build:watch": "node .task/build.js --watch",
"lint": "node .task/lint.js",
Expand Down
7 changes: 4 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stitches/core",
"version": "1.3.1-1",
"name": "@sigmacomputing/stitches-core",
"version": "1.3.2-0",
"description": "The modern CSS-in-JS library",
"type": "module",
"main": "dist/index.cjs",
Expand Down Expand Up @@ -78,5 +78,6 @@
"ts",
"variable",
"variables"
]
],
"stableVersion": "1.3.1-1"
}
7 changes: 4 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stitches/react",
"version": "1.3.1-1",
"name": "@sigmacomputing/stitches-react",
"version": "1.3.2-0",
"description": "The modern CSS-in-JS library",
"type": "module",
"main": "dist/index.cjs",
Expand Down Expand Up @@ -90,5 +90,6 @@
"preact",
"react",
"tsx"
]
],
"stableVersion": "1.3.1-1"
}
7 changes: 4 additions & 3 deletions packages/stringify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stitches/stringify",
"version": "1.3.1-1",
"name": "@sigmacomputing/stitches-stringify",
"version": "1.3.2-0",
"description": "Converts an object into CSS",
"type": "module",
"main": "dist/index.cjs",
Expand Down Expand Up @@ -38,5 +38,6 @@
},
"keywords": [
"css-in-js"
]
],
"stableVersion": "1.3.1-1"
}
1 change: 1 addition & 0 deletions packages/test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
traces/*
2 changes: 1 addition & 1 deletion packages/test/Issue-803-core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalCss } from '@stitches/core'
import { globalCss } from '@sigmacomputing/stitches-core'

void globalCss({
"@font-face": {
Expand Down
2 changes: 1 addition & 1 deletion packages/test/Issue-803-react.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalCss } from '@stitches/react'
import { globalCss } from '@sigmacomputing/stitches-react'

void globalCss({
"@font-face": {
Expand Down
4 changes: 2 additions & 2 deletions packages/test/Issue-813-core.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/stitchesjs/stitches/issues/813
import { createStitches } from '@stitches/core'
import * as Stitches from '@stitches/core'
import { createStitches } from '@sigmacomputing/stitches-core'
import * as Stitches from '@sigmacomputing/stitches-core'

export const { config, css } = createStitches({
theme: {
Expand Down
4 changes: 2 additions & 2 deletions packages/test/Issue-813-react.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/stitchesjs/stitches/issues/813
import { createStitches } from '@stitches/react'
import * as Stitches from '@stitches/react'
import { createStitches } from '@sigmacomputing/stitches-react'
import * as Stitches from '@sigmacomputing/stitches-react'

export const { config, styled } = createStitches({
theme: {
Expand Down
32 changes: 16 additions & 16 deletions packages/test/built-types/Issue-813-core.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Stitches from '@stitches/core';
import * as Stitches from '@sigmacomputing/stitches-core';
export declare const config: {
prefix: "";
media: {};
Expand All @@ -7,56 +7,56 @@ export declare const config: {
primary: string;
};
};
themeMap: import("@stitches/core/types/config").DefaultThemeMap;
themeMap: import("@sigmacomputing/stitches-core/types/config").DefaultThemeMap;
utils: {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/core/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/core/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithScaleValue<"colors">;
};
};
}, css: {
withConfig: (config: {
componentId?: string | undefined;
displayName?: string | undefined;
shouldForwardStitchesProp?: ((prop: "css" | (string & {})) => boolean | void) | undefined;
}) => import("@stitches/core/types/stitches").CssFunctionType<{}, {
}) => import("@sigmacomputing/stitches-core/types/stitches").CssFunctionType<{}, {
colors: {
primary: string;
};
}, import("@stitches/core/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-core/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/core/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/core/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithScaleValue<"colors">;
};
}>;
} & import("@stitches/core/types/stitches").CssFunctionType<{}, {
} & import("@sigmacomputing/stitches-core/types/stitches").CssFunctionType<{}, {
colors: {
primary: string;
};
}, import("@stitches/core/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-core/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/core/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/core/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithScaleValue<"colors">;
};
}>;
export declare const colorValue1: Stitches.PropertyValue<'backgroundColor', typeof config>;
export declare const colorValue2: Stitches.PropertyValue<'backgroundColor', typeof config>;
export declare const colorToken: Stitches.ScaleValue<'colors', typeof config>;
export declare const box: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, import("@stitches/core/types/css-util").CSS<{}, {
export declare const box: import("@sigmacomputing/stitches-core/types/styled-component").CssComponent<never, {}, {}, import("@sigmacomputing/stitches-core/types/css-util").CSS<{}, {
colors: {
primary: string;
};
}, import("@stitches/core/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-core/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/core/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/core/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithScaleValue<"colors">;
};
}>>;
32 changes: 16 additions & 16 deletions packages/test/built-types/Issue-813-react.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Stitches from '@stitches/react';
import * as Stitches from '@sigmacomputing/stitches-react';
export declare const config: {
prefix: "";
media: {};
Expand All @@ -7,56 +7,56 @@ export declare const config: {
primary: string;
};
};
themeMap: import("@stitches/react/types/config").DefaultThemeMap;
themeMap: import("@sigmacomputing/stitches-react/types/config").DefaultThemeMap;
utils: {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/react/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/react/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithScaleValue<"colors">;
};
};
}, styled: {
withConfig: (config: {
componentId?: string | undefined;
displayName?: string | undefined;
shouldForwardStitchesProp?: ((prop: "css" | (string & {})) => boolean | void) | undefined;
}) => import("@stitches/react/types/stitches").StyledFunctionType<{}, {
}) => import("@sigmacomputing/stitches-react/types/stitches").StyledFunctionType<{}, {
colors: {
primary: string;
};
}, import("@stitches/react/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-react/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/react/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/react/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithScaleValue<"colors">;
};
}>;
} & import("@stitches/react/types/stitches").StyledFunctionType<{}, {
} & import("@sigmacomputing/stitches-react/types/stitches").StyledFunctionType<{}, {
colors: {
primary: string;
};
}, import("@stitches/react/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-react/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/react/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/react/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithScaleValue<"colors">;
};
}>;
export declare const colorValue1: Stitches.PropertyValue<'backgroundColor', typeof config>;
export declare const colorValue2: Stitches.PropertyValue<'backgroundColor', typeof config>;
export declare const colorToken: Stitches.ScaleValue<'colors', typeof config>;
export declare const Box: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {}, import("@stitches/react/types/css-util").CSS<{}, {
export declare const Box: import("@sigmacomputing/stitches-react/types/styled-component").StyledComponent<"div", {}, {}, import("@sigmacomputing/stitches-react/types/css-util").CSS<{}, {
colors: {
primary: string;
};
}, import("@stitches/react/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-react/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/react/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/react/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithScaleValue<"colors">;
};
}>>;
Loading