Color2k - a color parsing and manipulation lib served in roughly 2kB

Overview

color2k
bundlephobia github status checks codecov weekly downloads semantic-release

a color parsing and manipulation lib served in roughly 2kB or less (2.8kB to be more precise)

color2k is a color parsing and manipulation library with the objective of keeping the bundle size as small as possible while still satisfying all of your color manipulation needs in an sRGB space.

The full bundle size is currently 2.8kB but gets as small as 2.1k with tree shaking.

Size comparison

lib size
chroma-js 13.7kB
polished 11.2kB
color 7.6kB
tinycolor2 5kB
color2k 2.8kB 😎

👋 Compare tree-shaken bundle outputs on bundle.js.org

Installation

npm i color2k

or

yarn add color2k

Usage

import { darken, transparentize } from 'color2k';

// e.g.
darken('blue', 0.1);
transparentize('red', 0.5);

How so small?

There are two secrets that keep this lib especially small:

  1. Simplicity — only handles basic color manipulation functions
  2. Less branching in code — only support two color models as outputs, namely rgba and hsla

Why only rgba and hsla as outputs?

This lib was created with the use case of CSS-in-JS in mind. At the end of the day, all that matters is that the browser can understand the color string you gave it as a background-color.

Because only those two color models are supported, we don't have to add code to deal with optional alpha channels or converting to non-browser supported color models (e.g. CMYK).

We believe that this lib is sufficient for all of your color manipulation needs. If we're missing a feature, feel free to open an issue 😎 .

Credits

Heavy credits goes to polished.js and sass. Much of the implementation of this lib is copied from polished!

API and Documentation

Head over to the docs site

Comments
  • Doesn't work on node 6

    Doesn't work on node 6

    (v1.2.0, of course, has "main" as a TS file, so it breaks everywhere) v1.2.1 breaks on node 6 with a syntax error, which is a breaking change in a minor version. I think perhaps you're using exponentiation (a ** b) when Math.pow(a, b) would serve.

    Additionally, v1.0.0+ uses .padStart, which is unavailable in node 6 - you can use https://npmjs.com/string.prototype.padstart for this.

    Please fix this ASAP, so react-dates can continue depending on this package. I'll be happy to make a PR.

    released 
    opened by ljharb 9
  • IE11 browser support

    IE11 browser support

    I just realised that color2k doesn't work in IE11 out of the box. 😭

    It throws a syntax error when encountering the first line of this bit of code: https://github.com/ricokahler/color2k/blob/f8f29d66261e47b8af926f710289a0ce704f2349/src/ColorError.ts#L1-L5

    It would've been great if that was mentioned somewhere on the website or in the docs. I'm also wondering if this is the only incompatible part of the code, and if so, would you be happy to let Babel compile it for IE11? Not sure if that would cause a substantial increase in bundle size.

    help wanted 
    opened by diondiondion 6
  • feat: conditional exports

    feat: conditional exports

    This PR:

    1. Adds conditional exports to color2k (see below)
    2. Includes #405
    3. Cleans up some ESLint package deps

    Color2k handles its own bundle with the following entry points and targets:

    • mainnode 4
    • unpkg — browserslist defaults
    • modulenode 6 for ES2015 support defined by rollup a while ago
    • exports.importnode 12 for ES2019 support (esbuild and node >12 in ES mode uses this entry point)
    • exports.defaultnode 12 for CJS node 12 support, since export maps weren't support until node 12
    • exports.package.json — for backwards compat to importing package.json (since it's restricted to import other files now)

    The following consumers have been manually tested:

    • [x] legacy node (e.g. node 4)
    • [x] <script type="module"> via skypack
    • [x] deno import via skypack
    • [x] jest with the default babel setup — this uses jest-resolve which uses resolve (maintained by none other than @ljharb! 😄). This works but uses the legacy main CJS bundle due to the complexity of closing https://github.com/browserify/resolve/issues/222. Note from the jest folks, they are highly unlikely to switch from resolve.
    • [x] @babel/register with [@babel/preset-env, {targets: 'node 12'}] — uses the CJS exports.require entry point
    • [x] @rollup/plugin-node-resolve — uses the exports.import entry point
    • [x] webpack 5 — uses enhanced-resolve with the conditions ["require", "module"] for CJS and ["import", "module"] for ESM. resolves to the exports.import entry point
    • [x] webpack 3 — this works and uses the legacy module entry point
    • [x] node LTS with both ESM/CJS — works as expected

    Closes #413

    released 
    opened by ricokahler 4
  • The main field in the package.json of `color2k@1.2.0` points to non-existent TypeScript file

    The main field in the package.json of `[email protected]` points to non-existent TypeScript file

    Description

    The latest release here breaks in common js environments. I'm running into issues when running tests in jest.

    The main field is pointing to "./dist/index.ts" as seen in the package.json hosted via unpkg.

    released 
    opened by ifiokjr 4
  • chore(deps): update dependency autoprefixer to v10.2.4

    chore(deps): update dependency autoprefixer to v10.2.4

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | autoprefixer | 10.2.3 -> 10.2.4 | age | adoption | passing | confidence |


    Release Notes

    postcss/autoprefixer

    v10.2.4

    Compare Source

    • Fixed browser names in npx autoprefixer --info.

    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Enabled.

    :recycle: Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    released 
    opened by renovate[bot] 4
  • chore(deps): update all

    chore(deps): update all

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @rollup/plugin-alias | 3.1.1 -> 3.1.2 | age | adoption | passing | confidence | | @rollup/plugin-babel | 5.2.2 -> 5.2.3 | age | adoption | passing | confidence | | @rollup/plugin-node-resolve | 11.1.0 -> 11.1.1 | age | adoption | passing | confidence |


    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Enabled.

    :recycle: Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    :ghost: Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    released 
    opened by renovate[bot] 4
  • chore(deps): update dependency rollup to v2.38.1

    chore(deps): update dependency rollup to v2.38.1

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | rollup (source) | 2.38.0 -> 2.38.1 | age | adoption | passing | confidence |


    Release Notes

    rollup/rollup

    v2.38.1

    Compare Source

    2021-01-28

    Bug Fixes
    • Fix internal error when resolving a missing entry point in the browser build (#​3935)
    Pull Requests

    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Enabled.

    :recycle: Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    released 
    opened by renovate[bot] 4
  • chore(deps): update dependency preact to v10.5.12

    chore(deps): update dependency preact to v10.5.12

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | preact (source) | 10.5.11 -> 10.5.12 | age | adoption | passing | confidence |


    Release Notes

    preactjs/preact

    v10.5.12

    Compare Source

    This release includes an enhancement to our devtools integration. Via a babel plugin you can get more readable hook names to show up in devtools instead of dozens of useState hooks in devtools. Check out https://github.com/preactjs/babel-plugin-transform-hook-names for more information.

    Before:

    image

    After:

    image

    Bug Fixes

    Maintenance


    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Enabled.

    :recycle: Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    released 
    opened by renovate[bot] 4
  • chore(deps): update typescript-eslint monorepo to v4.14.1

    chore(deps): update typescript-eslint monorepo to v4.14.1

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @typescript-eslint/eslint-plugin | 4.14.0 -> 4.14.1 | age | adoption | passing | confidence | | @typescript-eslint/parser | 4.14.0 -> 4.14.1 | age | adoption | passing | confidence |


    Release Notes

    typescript-eslint/typescript-eslint

    v4.14.1

    Compare Source

    Bug Fixes

    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Enabled.

    :recycle: Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    released 
    opened by renovate[bot] 4
  • chore(deps): update dependency rollup to v2.38.0

    chore(deps): update dependency rollup to v2.38.0

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | rollup (source) | 2.37.1 -> 2.38.0 | age | adoption | passing | confidence |


    Release Notes

    rollup/rollup

    v2.38.0

    Compare Source

    2021-01-22

    Features
    • Entirely remove declared variables that only have an initializer side effect (#​3933)
    Pull Requests

    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Enabled.

    :recycle: Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    released 
    opened by renovate[bot] 4
  • chore(deps): update dependency preact to v10.5.11

    chore(deps): update dependency preact to v10.5.11

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | preact (source) | 10.5.10 -> 10.5.11 | age | adoption | passing | confidence |


    Release Notes

    preactjs/preact

    v10.5.11

    Compare Source

    :chart_with_upwards_trend: Bug Fixes

    :golf: Code golfing

    :hammer_and_wrench: Maintenance


    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Enabled.

    :recycle: Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    released 
    opened by renovate[bot] 4
  • Using `toHex` with `hsla` where `a = 0` leads to a result with alpha=1

    Using `toHex` with `hsla` where `a = 0` leads to a result with alpha=1

    When you're using toHex("hsla(15, 50%, 50%, 0)")

    you'll get #bf6040

    which is the same as when using 1 as alpha.

    What I'd expect is that I get the 8-digit hex with 0 opacity #bf604000

    When I use any value that is not 0 it gives me the expected result

    Codesandbox: https://codesandbox.io/s/vigilant-meadow-4q4wj5?file=/src/index.js

    opened by six7 0
  • chore(deps): update jest monorepo to v29 (major)

    chore(deps): update jest monorepo to v29 (major)

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @types/jest (source) | 27.5.2 -> 29.2.3 | age | adoption | passing | confidence | | jest (source) | 28.1.3 -> 29.3.1 | age | adoption | passing | confidence |


    Release Notes

    facebook/jest

    v29.3.1

    Compare Source

    Fixes
    • [jest-config] Do not warn about preset in ProjectConfig (#​13583)
    Performance
    • [jest-transform] Defer creation of cache directory (#​13420)

    v29.3.0

    Compare Source

    Features
    • [jest-runtime] Support WebAssembly (Wasm) imports in ESM modules (#​13505)
    Fixes
    • [jest-config] Add config validation for projects option (#​13565)
    • [jest-mock] Treat cjs modules as objects so they can be mocked (#​13513)
    • [jest-worker] Throw an error instead of hanging when jest workers terminate unexpectedly (#​13566)
    Chore & Maintenance
    • [@jest/transform] Update convert-source-map (#​13509)
    • [docs] Mention toStrictEqual in UsingMatchers docs. (#​13560)

    v29.2.2

    Compare Source

    Fixes
    • [@jest/test-sequencer] Make sure sharding does not produce empty groups (#​13476)
    • [jest-circus] Test marked as todo are shown as todo when inside a focussed describe (#​13504)
    • [jest-mock] Ensure mock resolved and rejected values are promises from correct realm (#​13503)
    • [jest-snapshot] Don't highlight passing asymmetric property matchers in snapshot diff (#​13480)
    Chore & Maintenance
    • [docs] Update link to Jest 28 upgrade guide in error message (#​13483)
    • [jest-runner, jest-watcher] Update emittery (#​13490)

    v29.2.1

    Compare Source

    Features
    • [@jest/globals, jest-mock] Add jest.Spied* utility types (#​13440)
    Fixes
    • [jest-environment-node] make globalThis.performance writable for Node 19 and fake timers (#​13467)
    • [jest-mock] Revert #​13398 to restore mocking of setters (#​13472)
    Performance
    • [*] Use sha1 instead of sha256 for hashing (#​13421)

    v29.2.0

    Compare Source

    Features
    • [@jest/cli, jest-config] A seed for the test run will be randomly generated, or set by a CLI option (#​13400)
    • [@jest/cli, jest-config] --show-seed will display the seed value in the report, and can be set via a CLI flag or through the config file (#​13400)
    • [jest-config] Add readInitialConfig utility function (#​13356)
    • [jest-core] Allow testResultsProcessor to be async (#​13343)
    • [@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime] Add getSeed() to the jest object (#​13400)
    • [expect, @&#8203;jest/expect-utils] Allow isA utility to take a type argument (#​13355)
    • [expect] Expose AsyncExpectationResult and SyncExpectationResult types (#​13411)
    Fixes
    • [babel-plugin-jest-hoist] Ignore TSTypeQuery when checking for hoisted references (#​13367)
    • [jest-core] Fix detectOpenHandles false positives for some special objects such as TLSWRAP (#​13414)
    • [jest-mock] Fix mocking of getters and setters on classes (#​13398)
    • [jest-reporters] Revert: Transform file paths into hyperlinks (#​13399)
    • [@jest/types] Infer type of each table correctly when the table is a tuple or array (#​13381)
    • [@jest/types] Rework typings to allow the *ReturnedWith matchers to be called with no argument (#​13385)
    Chore & Maintenance
    • [*] Update @babel/* deps, resulting in slightly different stack traces for each (#​13422)
    Performance
    • [jest-runner] Do not instrument v8 coverage data if coverage should not be collected (#​13282)

    v29.1.2

    Compare Source

    Fixes
    • [expect, @&#8203;jest/expect] Revert buggy inference of argument types for *CalledWith and *ReturnedWith matchers introduced in 29.1.0 (#​13339)
    • [jest-worker] Add missing dependency on jest-util (#​13341)

    v29.1.1

    Compare Source

    Fixes
    • [jest-mock] Revert #​13145 which broke mocking of transpiled ES modules

    v29.1.0

    Compare Source

    Features
    • [expect, @&#8203;jest/expect] Support type inference for function parameters in CalledWith assertions (#​13268)
    • [expect, @&#8203;jest/expect] Infer type of *ReturnedWith matchers argument (#​13278)
    • [@jest/environment, jest-runtime] Allow jest.requireActual and jest.requireMock to take a type argument (#​13253)
    • [@jest/environment] Allow jest.mock and jest.doMock to take a type argument (#​13254)
    • [@jest/fake-timers] Add jest.now() to return the current fake clock time (#​13244, #​13246)
    • [@jest/mock] Add withImplementation method for temporarily overriding a mock (#​13281)
    • [expect] Export toThrow* matchers (#​13328)
    Fixes
    • [jest-circus, jest-jasmine2] Fix error messages for Node's assert.throes (#​13322)
    • [jest-haste-map] Remove __proto__ usage (#​13256)
    • [jest-mock] Improve spyOn typings to handle optional properties (#​13247)
    • [jest-mock] Fix mocking of getters and setters on classes (#​13145)
    • [jest-snapshot] Throw useful error when an array is passed as property matchers (#​13263)
    • [jest-snapshot] Prioritize parser used in the project (#​13323)
    • [jest-transform] Attempt to work around issues with atomic writes on Windows (#​11423)

    v29.0.3

    Compare Source

    Features
    • [@jest/environment, jest-runtime] Allow passing a generic type argument to jest.createMockFromModule<T>() method (#​13202)
    • [expect] Expose ExpectationResult type (#​13240)
    • [jest-snapshot] Expose Context type (#​13240)
    • [@jest/globals] Add jest.Mock type helper (#​13235)
    Fixes
    • [jest-core] Capture execError during TestScheduler.scheduleTests and dispatch to reporters (#​13203)
    • [jest-resolve] Make sure to resolve module paths after looking at exports (#​13242)
    • [jest-resolve] Improve error on module not found deep in the require stack (#​8704)
    • [jest-snapshot] Fix typings of snapshot matchers (#​13240)
    Chore & Maintenance
    • [*] Fix inconsistent workspace prefixes (#​13217)
    • [jest-haste-map] Expose a minimal public API to TypeScript (#​13023)

    v29.0.2

    Compare Source

    Features
    • [jest-transform] Expose TransformFactory type (#​13184)
    Fixes
    • [babel-plugin-jest-hoist] Support imported jest in mock factory (#​13188)
    • [jest-mock] Align the behavior and return type of generateFromMetadata method (#​13207)
    • [jest-runtime] Support jest.resetModules() with ESM (#​13211)

    v29.0.1

    Compare Source

    Fixes
    • [jest-snapshot] Pass snapshotFormat through when diffing snapshots (#​13181)

    v29.0.0

    Compare Source

    Features
    • [expect] [BREAKING] Differentiate between MatcherContext MatcherUtils and MatcherState types (#​13141)
    • [jest-circus] Add support for test.failing.each (#​13142)
    • [jest-config] [BREAKING] Make snapshotFormat default to escapeString: false and printBasicPrototype: false (#​13036)
    • [jest-config] [BREAKING] Remove undocumented collectCoverageOnlyFrom option (#​13156)
    • [jest-environment-jsdom] [BREAKING] Upgrade to jsdom@20 (#​13037, #​13058)
    • [@jest/globals] Add jest.Mocked, jest.MockedClass, jest.MockedFunction and jest.MockedObject utility types (#​12727)
    • [jest-mock] [BREAKING] Refactor Mocked* utility types. MaybeMockedDeep and MaybeMocked became Mocked and MockedShallow respectively; only deep mocked variants of MockedClass, MockedFunction and MockedObject are exported (#​13123, #​13124)
    • [jest-mock] [BREAKING] Change the default jest.mocked helper’s behavior to deep mocked (#​13125)
    • [jest-snapshot] [BREAKING] Let babel find config when updating inline snapshots (#​13150)
    • [@jest/test-result, @&#8203;jest/types] [BREAKING] Replace Bytes and Milliseconds types with number (#​13155)
    • [jest-worker] Adds workerIdleMemoryLimit option which is used as a check for worker memory leaks >= Node 16.11.0 and recycles child workers as required (#​13056, #​13105, #​13106, #​13107)
    • [pretty-format] [BREAKING] Remove ConvertAnsi plugin in favour of jest-serializer-ansi-escapes (#​13040)
    • [pretty-format] Allow to opt out from sorting object keys with compareKeys: null (#​12443)
    Fixes
    • [jest-config] Fix testing multiple projects with TypeScript config files (#​13099)
    • [@jest/expect-utils] Fix deep equality of ImmutableJS Record (#​13055)
    • [jest-haste-map] Increase the maximum possible file size that jest-haste-map can handle (#​13094)
    • [jest-runtime] Properly support CJS re-exports from dual packages (#​13170)
    • [jest-snapshot] Make prettierPath optional in SnapshotState (#​13149)
    • [jest-snapshot] Fix parsing error from inline snapshot files with JSX (#​12760)
    • [jest-worker] When a process runs out of memory worker exits correctly and doesn't spin indefinitely (#​13054)
    Chore & Maintenance
    • [*] [BREAKING] Drop support for Node v12 and v17 (#​13033)
    • [docs] Fix webpack name (#​13049)
    • [docs] Explicit how to set n for --bail (#​13128)
    • [docs] Update Enzyme URL (#​13166)
    • [jest-leak-detector] Remove support for weak-napi (#​13035)
    • [jest-snapshot] [BREAKING] Require rootDir as argument to SnapshotState (#​13150)

    Configuration

    📅 Schedule: Branch creation - "before 3am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Enabled.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update all (major)

    chore(deps): update all (major)

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @rollup/plugin-alias (source) | 3.1.9 -> 4.0.2 | age | adoption | passing | confidence | | @rollup/plugin-babel (source) | 5.3.1 -> 6.0.3 | age | adoption | passing | confidence | | @rollup/plugin-node-resolve (source) | 13.3.0 -> 15.0.1 | age | adoption | passing | confidence | | rollup (source) | 2.79.1 -> 3.5.1 | age | adoption | passing | confidence |


    Release Notes

    rollup/plugins (@​rollup/plugin-alias)

    v4.0.2

    Compare Source

    2022-10-21

    Updates
    • chore: update rollup dependencies (3038271)

    v4.0.1

    Compare Source

    Skipped for repo rebase

    v4.0.0

    2022-10-07

    Breaking Changes
    • fix: prepare for Rollup 3, handle latest node-resolve #​1269
    rollup/plugins (@​rollup/plugin-babel)

    v6.0.3

    Compare Source

    2022-11-25

    Updates
    • docs: small typo in babel plugin readme #​1355

    v6.0.2

    Compare Source

    2022-10-21

    Updates
    • chore: update rollup dependencies (3038271)

    v6.0.1

    Compare Source

    Skipped for repo rebase

    v6.0.0

    2022-10-08

    Breaking Changes
    rollup/plugins (@​rollup/plugin-node-resolve)

    v15.0.1

    Compare Source

    2022-10-21

    Updates
    • chore: update rollup dependencies (3038271)

    v15.0.0

    Compare Source

    2022-10-10

    Breaking Changes

    v14.1.0

    Compare Source

    2022-09-12

    Features
    • feat: add new option, modulePaths (#​1104)

    v14.0.1

    Compare Source

    2022-09-08

    Bugfixes
    • fix: handle circular commonjs (#​1259)

    v14.0.0

    2022-09-06

    Breaking Changes
    • fix: preserve moduleSideEffects when re-resolving files (#​1245)
    rollup/rollup

    v3.5.1

    Compare Source

    2022-12-01

    Bug Fixes
    • Accept functions returning a config in defineConfig (#​4728)
    Pull Requests
    • #​4728: Overload defineConfig to accept a RollupOptionsFunction parameter (@​Septh)

    v3.5.0

    Compare Source

    2022-11-27

    Features
    • Add treeshake.manualPureFunctions to override static analysis for explicit function names (#​4718)
    Bug Fixes
    • Do not throw when a plugin uses this.load without awaiting its result (#​4725)
    Pull Requests

    v3.4.0

    Compare Source

    2022-11-22

    Features
    • Do not keep unused Object.freeze calls on object literals (#​4720)
    Pull Requests

    v3.3.0

    Compare Source

    2022-11-12

    Features
    • Add "experimentalMinChunkSize" option to merge smaller chunks into larger ones (#​4705)
    • Automatically deduplicate assets again when the source is a Buffer (#​4712)
    • Deduplicate Buffer with string assets (#​4712)
    Bug Fixes
    • Support plugins with object hooks when using perf: true (#​4707)
    Pull Requests

    v3.2.5

    Compare Source

    2022-11-01

    Bug Fixes
    • We deconflicting classes, ensure the original class name still does not shadow variables (#​4697)
    Pull Requests

    v3.2.4

    Compare Source

    2022-10-31

    Bug Fixes
    • Always use forward slashes in chunk ids when preserving modules, even on Windows (#​4693)
    • Escape problematic characters in ids when rewriting import.meta.url (#​4693)
    Pull Requests

    v3.2.3

    Compare Source

    2022-10-18

    Bug Fixes
    • Fix an issue whre Rollup confused new.target with import.meta (#​4679)
    • Ensure that Rollup does not make assumptions about the value of unknown namespace import members (#​4684)
    Pull Requests

    v3.2.2

    Compare Source

    2022-10-16

    Bug Fixes
    • Do not hang/crash on hashbang comments in input modules (#​4676)
    Pull Requests

    v3.2.1

    Compare Source

    2022-10-16

    Bug Fixes
    • Rewrite class declarations to preserve their .name property if necessary (#​4674)
    Pull Requests

    v3.2.0

    Compare Source

    2022-10-15

    Features
    • Support providing Promises as plugins like Vite (#​4671)
    Pull Requests

    v3.1.0

    Compare Source

    2022-10-12

    Features
    • Support using arrays of plugins as plugins like Vite (#​4657)
    Pull Requests

    v3.0.1

    Compare Source

    2022-10-12

    Bug Fixes
    • Fix installation on Windows (#​4662)
    • Avoid missing parameters that are only used in a destructuring initializer (#​4663)
    Pull Requests

    v3.0.0

    Compare Source

    2022-10-11

    Breaking Changes
    General Changes
    • Rollup now requires at least Node 14.18.0 to run (#​4548 and #​4596)
    • The browser build has been split into a separate package @rollup/browser (#​4593)
    • The node build uses the node: prefix for imports of builtin modules (#​4596)
    • Some previously deprecated features have been removed (#​4552):
      • Some plugin context functions have been removed:
        • this.emitAsset(): use this.emitFile()
        • this.emitChunk(): use this.emitFile()
        • this.getAssetFileName(): use this.getFileName()
        • this.getChunkFileName(): use this.getFileName()
        • this.isExternal(): use this.resolve()
        • this.resolveId(): use this.resolve()
      • The resolveAssetUrl plugin hook has been removed: use resolveFileUrl
      • Rollup no longer passes assetReferenceId or chunkReferenceId parameters to resolveFileUrl
      • The treeshake.pureExternalModules option has been removed: use treeshake.moduleSideEffects: 'no-external'
      • You may no longer use true or false for output.interop. As a replacement for true, you can use "compat"
      • Emitted assets no longer have an isAsset flag in the bundle
      • Rollup will no longer fix assets added directly to the bundle by adding the type: "asset" field
    • Some features that were previously marked for deprecation now show warnings when used (#​4552):
      • Some options have been deprecated:
        • inlineDynamicImports as part of the input options: use output. inlineDynamicImports
        • manualChunks as part of the input options: use output. manualChunks
        • maxParallelFileReads: use `maxParallelFileOps
        • output.preferConst: use output.generatedCode.constBindings
        • output.dynamicImportFunction: use the renderDynamicImport plugin hook
        • output.namespaceToStringTag: use output.generatedCode.symbols
        • preserveModules as part of the input options: use output. preserveModules
      • You should no longer access this.moduleIds in plugins: use this.getModuleIds()
      • You should no longer access this.getModuleInfo(...).hasModuleSideEffects in plugins: use this.getModuleInfo(...).moduleSideEffects
    • Configuration files are only bundled if either the --configPlugin or the --bundleConfigAsCjs options are used. The configuration is bundled to an ES module unless the --bundleConfigAsCjs option is used. In all other cases, configuration is now loaded using Node's native mechanisms (#​4574 and #​4621)
    • The properties attached to some errors have been changed so that there are fewer different possible properties with consistent types (#​4579)
    • Some errors have been replaced by others (ILLEGAL_NAMESPACE_REASSIGNMENT -> ILLEGAL_REASSIGNMENT, NON_EXISTENT_EXPORT -> MISSING_EXPORT) (#​4579)
    • Files in rollup/dist/* can only be required using their file extension (#​4581)
    • The loadConfigFile helper now has a named export of the same name instead of a default export (#​4581)
    • When using the API and sourcemaps, sourcemap comments are contained in the emitted files and sourcemaps are emitted as regular assets (#​4605)
    • Watch mode no longer uses Node's EventEmitter but a custom implementation that awaits Promises returned from event handlers (#​4609)
    • Assets may only be deduplicated with previously emitted assets if their source is a string (#​4644)
    • By default, Rollup will keep external dynamic imports as import(…) in commonjs output unless output.dynamicImportInCjs is set to false (#​4647)
    Changes to Rollup Options
    • As functions passed to output.banner/footer/intro/outro are now called per-chunk, they should be careful to avoid performance-heavy operations (#​4543)
    • entryFileNames/chunkFileNames functions now longer have access to the rendered module information via modules, only to a list of included moduleIds (#​4543)
    • The path of a module is no longer prepended to the corresponding chunk when preserving modules (#​4565)
    • When preserving modules, the [name] placeholder (as well as the chunkInfo.name property when using a function) now includes the relative path of the chunk as well as optionally the file extension if the extension is not one of .js, .jsx, .mjs, .cjs, .ts, .tsx, .mts, or .cts (#​4565)
    • The [ext], [extName] and [assetExtName] placeholders are no longer supported when preserving modules (#​4565)
    • The perf option no longer collects timings for the asynchronous part of plugin hooks as the readings were wildly inaccurate and very misleading, and timings are adapted to the new hashing algorithm (#​4566)
    • Change the default value of makeAbsoluteExternalsRelative to "ifRelativeSource" so that absolute external imports will no longer become relative imports in the output, while relative external imports will still be renormalized (#​4567)
    • Change the default for output.generatedCode.reservedNamesAsProps to no longer quote properties like default by default (#​4568)
    • Change the default for preserveEntrySignatures to "exports-only" so that by default, empty facades for entry chunks are no longer created (#​4576)
    • Change the default for output.interop to "default" to better align with NodeJS interop (#​4611)
    • Change the default for output.esModule to "if-default-prop", which only adds __esModule when the default export would be a property (#​4611)
    • Change the default for output.systemNullSetters to true, which requires at least SystemJS 6.3.3 (#​4649)
    Plugin API Changes
    • Plugins that add/change/remove imports or exports in renderChunk should make sure to update ChunkInfo.imports/importedBindings/exports accordingly (#​4543)
    • The order of plugin hooks when generating output has changed (#​4543)
    • Chunk information passed to renderChunk now contains names with hash placeholders instead of final names, which will be replaced when used in the returned code or ChunkInfo.imports/importedBindings/exports (#​4543 and #​4631)
    • Hooks defined in output plugins will now run after hooks defined in input plugins (used to be the other way around) (#​3846)
    Features
    • Functions passed to output.banner/footer/intro/outro are now called per-chunk with some chunk information (#​4543)
    • Plugins can access the entire chunk graph via an additional parameter in renderChunk (#​4543)
    • Chunk hashes only depend on the actual content of the chunk and are otherwise stable against things like renamed/moved source files or changed module resolution order (#​4543)
    • The length of generated file hashes can be customized both globally and per-chunk (#​4543)
    • When preserving modules, the regular entryFileNames logic is used and the path is included in the [name] property. This finally gives full control over file names when preserving modules (#​4565)
    • output.entryFileNames now also supports the [hash] placeholder when preserving modules (#​4565)
    • The perf option will now collect (synchronous) timings for all plugin hooks, not just a small selection (#​4566)
    • All errors thrown by Rollup have name: RollupError now to make clearer that those are custom error types (#​4579)
    • Error properties that reference modules (such as id and ids) will now always contain the full ids. Only the error message will use shortened ids (#​4579)
    • Errors that are thrown in response to other errors (e.g. parse errors thrown by acorn) will now use the standardized cause property to reference the original error (#​4579)
    • If sourcemaps are enabled, files will contain the appropriate sourcemap comment in generateBundle and sourcemap files are available as regular assets (#​4605)
    • Returning a Promise from an event handler attached to a RollupWatcher instance will make Rollup wait for the Promise to resolve (#​4609)
    • There is a new value "compat" for output.interop that is similar to "auto" but uses duck-typing to determine if there is a default export (#​4611)
    • There is a new value "if-default-prop" for esModule that only adds an __esModule marker to the bundle if there is a default export that is rendered as a property (#​4611)
    • Rollup can statically resolve checks for foo[Symbol.toStringTag] to "Module" if foo is a namespace (#​4611)
    • There is a new CLI option --bundleConfigAsCjs which will force the configuration to be bundled to CommonJS (#​4621)
    • Import assertions for external imports that are present in the input files will be retained in ESM output (#​4646)
    • Rollup will warn when a module is imported with conflicting import assertions (#​4646)
    • Plugins can add, remove or change import assertions when resolving ids (#​4646)
    • The output.externalImportAssertions option allows to turn off emission of import assertions (#​4646)
    • Use output.dynamicImportInCjs to control if dynamic imports are emitted as import(…) or wrapped require(…) when generating commonjs output (#​4647)
    Bug Fixes
    • Chunk hashes take changes in renderChunk, e.g. minification, into account (#​4543)
    • Hashes of referenced assets are properly reflected in the chunk hash (#​4543)
    • No longer warn about implicitly using default export mode to not tempt users to switch to named export mode and break Node compatibility (#​4624)
    • Avoid performance issues when emitting thousands of assets (#​4644)
    Pull Requests

    Configuration

    📅 Schedule: Branch creation - "before 3am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Enabled.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Support space separated rgb values

    Support space separated rgb values

    Example:

    color2k.parseToRgba('rgb(255 235 235 / .18)') // (index):139 Uncaught Error: Failed to parse color
    

    This should work with the new CSS Color Module Level 4

    opened by superMDguy 0
  • chore(deps): update babel monorepo

    chore(deps): update babel monorepo

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @babel/core (source) | 7.18.13 -> 7.20.5 | age | adoption | passing | confidence | | @babel/node (source) | 7.18.10 -> 7.20.5 | age | adoption | passing | confidence | | @babel/preset-env (source) | 7.18.10 -> 7.20.2 | age | adoption | passing | confidence |


    Release Notes

    babel/babel

    v7.20.5

    Compare Source

    :eyeglasses: Spec Compliance
    • babel-helpers, babel-plugin-transform-destructuring, babel-plugin-transform-modules-commonjs, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime, babel-traverse
    • babel-cli, babel-helpers, babel-plugin-proposal-class-properties, babel-plugin-proposal-class-static-block, babel-plugin-transform-classes, babel-plugin-transform-runtime, babel-preset-env
    • babel-helper-create-class-features-plugin, babel-helpers, babel-plugin-proposal-decorators, babel-plugin-proposal-private-property-in-object, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
    :bug: Bug Fix
    • babel-parser
    • babel-helper-wrap-function, babel-preset-env, babel-traverse
    • babel-plugin-transform-arrow-functions, babel-plugin-transform-parameters, babel-traverse
    • babel-helpers, babel-node, babel-plugin-proposal-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
    • babel-helper-create-regexp-features-plugin
    • babel-parser, babel-types
    • babel-generator
    • babel-plugin-transform-block-scoping, babel-traverse
    :nail_care: Polish
    :house: Internal

    v7.20.2

    Compare Source

    :bug: Bug Fix
    • babel-core, babel-helper-create-class-features-plugin, babel-helper-module-transforms, babel-helper-plugin-utils, babel-helper-simple-access, babel-node, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-plugin-transform-react-constant-elements, babel-preset-env, babel-standalone, babel-types
    • babel-plugin-transform-typescript
    • babel-parser
    • babel-generator
    • babel-plugin-proposal-decorators, babel-plugin-proposal-object-rest-spread, babel-plugin-transform-jscript
    • babel-plugin-transform-destructuring

    v7.19.6

    Compare Source

    :eyeglasses: Spec Compliance
    • babel-plugin-proposal-decorators
    :bug: Bug Fix
    :nail_care: Polish
    • babel-generator, babel-plugin-transform-flow-comments
    :memo: Documentation
    :house: Internal
    :running_woman: Performance

    v7.19.3

    Compare Source

    :bug: Bug Fix
    :nail_care: Polish
    :house: Internal
    • babel-helper-compilation-targets, babel-helper-transform-fixture-test-runner, babel-parser, babel-preset-env, babel-traverse
    :microscope: Output optimization

    v7.19.1

    Compare Source

    :bug: Bug Fix

    v7.19.0

    Compare Source

    :eyeglasses: Spec Compliance
    :rocket: New Feature
    • babel-generator, babel-helpers, babel-parser, babel-plugin-proposal-decorators, babel-plugin-syntax-decorators, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
    • babel-parser
    • babel-generator, babel-parser
    • babel-standalone
    • babel-helper-create-regexp-features-plugin, babel-helpers, babel-plugin-proposal-duplicate-named-capturing-groups-regex, babel-plugin-transform-named-capturing-groups-regex, babel-standalone
    :bug: Bug Fix
    • babel-helper-function-name, babel-helper-wrap-function, babel-plugin-transform-classes
      • #​14897 Fix: class transform should not drop method definition when key contains non-BMP characters (@​JLHwung)
    • babel-plugin-transform-typescript
    • babel-parser
    • babel-helper-builder-react-jsx
    :nail_care: Polish
    :memo: Documentation
    :house: Internal

    Configuration

    📅 Schedule: Branch creation - "before 3am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Enabled.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update all

    chore(deps): update all

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @types/react (source) | 18.0.21 -> 18.0.25 | age | adoption | passing | confidence | | @types/react-dom (source) | 18.0.6 -> 18.0.9 | age | adoption | passing | confidence | | autoprefixer | 10.4.12 -> 10.4.13 | age | adoption | passing | confidence | | cssnano | 5.1.13 -> 5.1.14 | age | adoption | passing | confidence | | eslint (source) | 8.24.0 -> 8.28.0 | age | adoption | passing | confidence | | postcss (source) | 8.4.17 -> 8.4.19 | age | adoption | passing | confidence | | preact (source) | 10.11.0 -> 10.11.3 | age | adoption | passing | confidence | | preact-render-to-string | 5.2.4 -> 5.2.6 | age | adoption | passing | confidence | | prettier (source) | 2.7.1 -> 2.8.0 | age | adoption | passing | confidence | | typescript (source) | 4.8.4 -> 4.9.3 | age | adoption | passing | confidence |


    Release Notes

    postcss/autoprefixer

    v10.4.13

    Compare Source

    • Fixed missed prefixes on vendor prefixes in name of CSS Custom Property.
    cssnano/cssnano

    v5.1.14: v5.1.14

    Compare Source

    Bug Fixes

    • fix: update autoprefixer and browserslist
    • fix(postcss-reduce-initial): improve initial properties data
    eslint/eslint

    v8.28.0

    Compare Source

    Features

    • 63bce44 feat: add ignoreClassFieldInitialValues option to no-magic-numbers (#​16539) (Milos Djermanovic)
    • 8385ecd feat: multiline properties in rule key-spacing with option align (#​16532) (Francesco Trotta)
    • a4e89db feat: no-obj-calls support Intl (#​16543) (Sosuke Suzuki)

    Bug Fixes

    • c50ae4f fix: Ensure that dot files are found with globs. (#​16550) (Nicholas C. Zakas)
    • 9432b67 fix: throw error for first unmatched pattern (#​16533) (Milos Djermanovic)
    • e76c382 fix: allow * 1 when followed by / in no-implicit-coercion (#​16522) (Milos Djermanovic)

    Documentation

    Chores

    v8.27.0

    Compare Source

    Features

    • f14587c feat: new no-new-native-nonconstructor rule (#​16368) (Sosuke Suzuki)
    • 978799b feat: add new rule no-empty-static-block (#​16325) (Sosuke Suzuki)
    • 69216ee feat: no-empty suggest to add comment in empty BlockStatement (#​16470) (Nitin Kumar)
    • 319f0a5 feat: use context.languageOptions.ecmaVersion in core rules (#​16458) (Milos Djermanovic)

    Bug Fixes

    • c3ce521 fix: Ensure unmatched glob patterns throw an error (#​16462) (Nicholas C. Zakas)
    • 886a038 fix: handle files with unspecified path in getRulesMetaForResults (#​16437) (Francesco Trotta)

    Documentation

    • ce93b42 docs: Stylelint property-no-unknown (#​16497) (Nick Schonning)
    • d2cecb4 docs: Stylelint declaration-block-no-shorthand-property-overrides (#​16498) (Nick Schonning)
    • 0a92805 docs: stylelint color-hex-case (#​16496) (Nick Schonning)
    • 74a5af4 docs: fix stylelint error (#​16491) (Milos Djermanovic)
    • 324db1a docs: explicit stylelint color related rules (#​16465) (Nick Schonning)
    • 94dc4f1 docs: use Stylelint for HTML files (#​16468) (Nick Schonning)
    • cc6128d docs: enable stylelint declaration-block-no-duplicate-properties (#​16466) (Nick Schonning)
    • d03a8bf docs: Add heading to justification explanation (#​16430) (Maritaria)
    • 8a15968 docs: add Stylelint configuration and cleanup (#​16379) (Nick Schonning)
    • 9b0a469 docs: note commit messages don't support scope (#​16435) (Andy Edwards)
    • 1581405 docs: improve context.getScope() docs (#​16417) (Ben Perlmutter)
    • b797149 docs: update formatters template (#​16454) (Milos Djermanovic)
    • 5ac4de9 docs: fix link to formatters on the Core Concepts page (#​16455) (Vladislav)
    • 33313ef docs: core-concepts: fix link to semi rule (#​16453) (coderaiser)

    v8.26.0

    Compare Source

    Features
    • 4715787 feat: check Object.create() in getter-return (#​16420) (Yuki Hirasawa)
    • 28d1902 feat: no-implicit-globals supports exported block comment (#​16343) (Sosuke Suzuki)
    • e940be7 feat: Use ESLINT_USE_FLAT_CONFIG environment variable for flat config (#​16356) (Tomer Aberbach)
    • dd0c58f feat: Swap out Globby for custom globbing solution. (#​16369) (Nicholas C. Zakas)
    Bug Fixes
    • df77409 fix: use baseConfig constructor option in FlatESLint (#​16432) (Milos Djermanovic)
    • 33668ee fix: Ensure that glob patterns are matched correctly. (#​16449) (Nicholas C. Zakas)
    • 740b208 fix: ignore messages without a ruleId in getRulesMetaForResults (#​16409) (Francesco Trotta)
    • 8f9759e fix: --ignore-pattern in flat config mode should be relative to cwd (#​16425) (Milos Djermanovic)
    • 325ad37 fix: make getRulesMetaForResults return a plain object in trivial case (#​16438) (Francesco Trotta)
    • a2810bc fix: Ensure that directories can be unignored. (#​16436) (Nicholas C. Zakas)
    • 35916ad fix: Ensure unignore and reignore work correctly in flat config. (#​16422) (Nicholas C. Zakas)
    Documentation
    • 651649b docs: Core concepts page (#​16399) (Ben Perlmutter)
    • 631cf72 docs: note --ignore-path not supported with flat config (#​16434) (Andy Edwards)
    • 1692840 docs: fix syntax in examples for new config files (#​16427) (Milos Djermanovic)
    • d336cfc docs: Document extending plugin with new config (#​16394) (Ben Perlmutter)
    Chores

    v8.25.0

    Compare Source

    Features

    • 173e820 feat: Pass --max-warnings value to formatters (#​16348) (Brandon Mills)
    • 6964cb1 feat: remove support for ignore files in FlatESLint (#​16355) (Milos Djermanovic)
    • 1cc4b3a feat: id-length counts graphemes instead of code units (#​16321) (Sosuke Suzuki)

    Documentation

    Chores

    postcss/postcss

    v8.4.19

    Compare Source

    • Fixed whitespace preserving after AST transformations (by Romain Menke).

    v8.4.18

    Compare Source

    • Fixed an error on absolute: true with empty sourceContent (by Rene Haas).
    preactjs/preact

    v10.11.3

    Compare Source

    Bug Fixes

    Maintenance

    v10.11.2

    Compare Source

    Bug Fixes

    Types

    v10.11.1

    Compare Source

    Bug Fixes

    developit/preact-render-to-string

    v5.2.6

    Compare Source

    Patch Changes

    v5.2.5

    Compare Source

    Patch Changes
    prettier/prettier

    v2.8.0

    Compare Source

    diff

    🔗 Release Notes

    Microsoft/TypeScript

    v4.9.3: TypeScript 4.9

    Compare Source

    For release notes, check out the release announcement.

    Downloads are available on:

    Changes:

    See More
    • 3d2b401 Fix assertion functions accessed via wildcard imports (#​51324)
    • 64d0d5a fix(51301): Fixing an unused import at the end of a line removes the newline (#​51320)
    • 754eeb2 Update CodeQL workflow and configuration, fix found bugs (#​51263)
    • d8aad26 Update package-lock.json
    • d4f26c8 fix(51245): Class with parameter decorator in arrow function causes "convert to default export" refactoring failure (#​51256)
    • 16faf45 Update package-lock.json
    • 8b1ecdb fix(50654): "Move to a new file" breaks the declaration of referenced variable (#​50681)
    • 170a17f Dom update 2022-10-25 (#​51300)
    • 9c4e14d Remove "No type information for this code" from baseline (#​51311)
    • 88d25b4 fix(50068): Refactors trigger debug failure when JSX text has a ' and a tag on the same line. (#​51299)
    • 8bee69a Update package-lock.json
    • 702de1e Fix early call to return/throw on generator (#​51294)
    • 2c12b14 Add a GH Action to file a new issue if we go a week without seeing a typescript-error-deltas issue (#​51271)
    • 6af270d Update package-lock.json
    • 2cc4c16 Update package-lock.json
    • 6093491 Fix apparent typo in getStringMappingType (#​51248)
    • 61c2609 Update package-lock.json
    • ef69116 Generate shortest rootDirs module specifier instead of first possible (#​51244)
    • bbb42f4 Fix typo in canWatchDirectoryOrFile found by CodeQL (#​51262)
    • a56b254 Include 'this' type parameter in isRelatedTo fast path (#​51230)
    • 3abd351 Fix super property transform in async arrow in method (#​51240)
    • eed0511 Update package-lock.json
    • 2625c1f Make the init config category order predictable (#​51247)
    • 1ca99b3 fix(50551): Destructuring assignment with var bypasses "variable is used before being assigned" check (2454) (#​50560)
    • 3f28fa1 Update package-lock.json
    • 906ebe4 Revert structuredTypeRelatedTo change and fix isUnitLikeType (#​51076)
    • 8ac4652 change type (#​51231)
    • 245a02c fix(51222): Go-to-definition on return statements should jump to the containing function declaration (#​51227)
    • 2dff34e markAliasReferenced should include ExportValue as well (#​51219)
    • 5ef2634 Update package-lock.json
    • d0f0e35 Remove old tslint comments (#​51220)
    • 85d405a Fixed a false positive "await has no effect on the type" diagnostic with mixed generic union (#​50833)
    • 1f8959f fix: avoid downleveled dynamic import closing over specifier expression (#​49663)
    • 11066b2 Rename internal functions to narrowTypeBySwitchOnTypeOf and narrowTypeByInKeyword (#​51215)
    • 4c9afe8 Update package-lock.json
    • f25bcb7 fix(49196): add jsdoc snippet for interface member functions (#​51135)
    • 7406ee9 fix(51170): Completing an unimplemented property overwrites rest of line (#​51175)
    • a1d82fc Remove some unnecessary code discovered by rollup (#​51204)
    • 0481773 LEGO: Merge pull request 51200
    • 98c19cb LEGO: Merge pull request 51190
    • 13c9b05 Update package-lock.json
    • 673475e Update package-lock.json
    • f6cf510 Add more tracing to node16/nodenext resolution (#​51168)
    • 83c5581 Update package-lock.json
    • be5f0fe Add an extra regression test for awaited unresolvable recursive union (#​51167)
    • 2cb7e77 fix(50416): correctly names disabled export refactors (#​50663) [ #​50416 ]
    • 2bcfed0 feat(37440): Provide a quick-fix for non-exported types (#​51038)
    • a24201c Remove VSDevMode.ps1 and createPlaygroundBuild (#​51166)
    • 2da62a7 fix(51112): omit parameter names that precede the type (#​51142)
    • cf1b6b7 feat(51163): show QF to fill in the missing properties for the mapped type. (#​51165)
    • bdcc240 Remove bug-causing carve-out in conditional type instantiation that hopefully is no longer required (#​51151)
    • 37317a2 Check nested weak types in intersections on target side of relation (#​51140)
    • 9f49f9c Update package-lock.json
    • 4f54e7e Fix isExhaustiveSwitchStatement to better handle circularities (#​51095)
    • 503604c Overloads shouldn't gain @​deprecated tags of other overloads in quick info (#​50904)
    • e14a229 Update package-lock.json
    • 67256e5 Remove unused declarations array in extractSymbol's TargetRange (#​51091)
    • 9c87ded fix(51100): ensure tsserver shuts down when parent process is killed (#​51107)
    • c01ae01 Fix nightly publish oops in Gulpfile (#​51131)
    • a7d10f1 Update package-lock.json
    • d0bfd8c fix(51072): ts.preProcessFile finds import in template string after conditional expression with template strings (#​51082)
    • ad56b5c Convert scripts/Gulpfile to checked mjs/cjs so they can run without compilation (#​50988)
    • dbeae5d fix(51017): Make lineText in the references response opt-out (#​51081)
    • d06a592 Properly defer resolution of mapped types with generic as clauses (#​51050)
    • 42b1049 Update package-lock.json
    • 5f3e6cc Plugin probe location is higher priority than peer node_modules (#​51079) [ #​34616 ]
    • 2648f6a Plugins in project were adding up after every config file reload (#​51087)
    • c18791c Fix incorrect options type to WatchOptions (#​51064)
    • b0795e9 Update package-lock.json
    • 43c6fd4 Covert some of the config testing to baselines for easy validation (#​51063)
    • fc5e72b Remove unused defaultWatchFileKind method since useFsEvents is default for tsserver and tsc (#​51044)
    • 8af9a93 Use typescript.d.ts in APISample tests (#​51061)
    • 4953316 Remove configureLanguageServiceBuild, instrumenter (#​51048)
    • 9dfffd0 Update GitHub Actions (#​51045)
    • 4635a5c Update package-lock.json
    • 33a34e5 Adding a JSDoc comment to the es5 type declarations to describe the functionality of Date.now() (#​50630)
    • 299745c Fix crash in goto-def on @override (#​51016)
    • 7dcf11f fix(50750): Object type literal with string literal property in contextual typing position causes language service error on all literal type references (#​50757)
    • 5cd49f6 Update package-lock.json
    • 8a1b858 Update package-lock.json
    • 96894db Include type parameter defaults in contextual typing (#​50994) [ #​51002 ]
    • 0d0a793 Allow Unicode extended escapes in ES5 and earlier (#​50918)
    • 58bae8d Update package-lock.json
    • 0ce72ef Add option to OrganizeImports for removal only (#​50931)
    • 42f9143 feat: codefix for for await of (#​50623)
    • ecf50e8 Properly compute SymbolFlags.Optional for intersected properties (#​50958)
    • d1586de Fully resolve aliases when checking symbol flags (#​50853)
    • 45148dd Update LKG to 4.8.4 (#​50987)
    • 9a83f25 Update package-lock.json
    • 865848f Fix <= and > comparisons when compared against prerelease versions (#​50915)
    • fbfe934 Fix comparability between type parameters related by a union constraint (#​50978)
    • b09e93d Merge pull request #​50041 from microsoft/fix/47969
    • 0ac12bb Update package-lock.json
    • 8192d55 Pick correct compilerOptions when checking if we can share emitSignatures (#​50910) [ #​50902 ]
    • 16faef1 During uptodate ness check with buildInfo, check if there are errors explicitly with noEmit (#​50974) [ #​50959 ]
    • 63791f5 Update package-lock.json
    • 09368bc Handle if project for open file will get recollected because of pending cleanup from closed script info (#​50908) [ #​50868 ]
    • c81bf4d fix(49594): Typescript 4.7.3 bracketed class property compilation error strictPropertyInitialization:true (#​49619)
    • bc9cbbe Merge pull request #​49912 from microsoft/fix/47508
    • [5a10f46](htt

    Configuration

    📅 Schedule: Branch creation - "before 3am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Enabled.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
Releases(v2.0.0)
Owner
Rico Kahler
Sanity.io Software Engineer in Detroit | previously at Bloomscape
Rico Kahler
:rainbow: Javascript color conversion and manipulation library

color JavaScript library for immutable color conversion and manipulation with support for CSS color strings. var color = Color('#7743CE').alpha(0.5).l

Qix 4.5k Jan 3, 2023
Fast, small color manipulation and conversion for JavaScript

TinyColor JavaScript color tooling TinyColor is a small, fast library for color manipulation and conversion in JavaScript. It allows many forms of inp

Brian Grinstead 4.5k Jan 1, 2023
A tool for creating and maintaining cohesive, consistent, and accessible color palettes

Primer Prism Primer Prism is a tool for creating and maintaining cohesive, consistent, and accessible color palettes. ?? primer.style/prism ?? Read th

Primer 517 Jan 3, 2023
A simple Discord bot that will listen for HEX, RGB(a), and HSL(a) colors in a message, and provide a small image of that color.

Pigment For the teams of designers and developers out there - Pigment will listen for messages containing a HEX, RGB(a), or HSL(a) color, and provide

Conrad Crawford 17 Dec 8, 2022
JavaScript Library for creating random pleasing colors and color schemes

#PleaseJS www.checkman.io/please Please.js is a polite companion that wants to help you make your projects beautiful. It uses HSV color space to creat

Jordan Checkman 2.3k Dec 22, 2022
Coloris - A lightweight and elegant JavaScript color picker. Written in vanilla ES6, no dependencies. Accessible.

Coloris A lightweight and elegant JavaScript color picker written in vanilla ES6. Convert any text input field into a color field. View demo Features

Momo Bassit 126 Dec 27, 2022
Create your own complete Web color system fast and easy!

Simpler Color Create your own complete Web color system fast and easy, from as little as one base color! Color is at the heart of every UI design syst

Arnel Enero 278 Dec 20, 2022
A TypeScript package to calculate WCAG 2.0/3.0 and APCA color contrasts

a11y-color-contrast A simple utility package for working with WCAG 2.2/3.0 color contrasts a11y: Built for checking how readable colors are together S

Sondre Aasemoen 10 Oct 10, 2022
JavaScript library for all kinds of color manipulations

Chroma.js Chroma.js is a tiny small-ish zero-dependency JavaScript library (13.5kB) for all kinds of color conversions and color scales. Usage Initiat

Gregor Aisch 9.2k Jan 4, 2023
A simple color picker application written in pure JavaScript, for modern browsers.

Color Picker A simple color picker application written in pure JavaScript, for modern browsers. Has support for touch events. Touchy… touchy… Demo and

Taufik Nurrohman 207 Dec 14, 2022
A CLI utility to calculate/verify accessible magic numbers for a color palette.

A11y Contrast A CLI utility to calculate/verify accessible magic numbers for a color palette. Read my blog post for some more information. Installatio

Darek Kay 23 Nov 13, 2022
A dependency-free image color extraction library

Color mage A dependency-free image color extraction library. The extraction consists of using K-Means algorithm. It has a few utility functions as wel

Gilmar Quinelato 4 Mar 11, 2022
A array with color name -> decimal rgbs.

colors-named-decimal A array with color name -> decimal rgbs. Based on https://www.w3.org/TR/css-color-4/#colors-named Installation This package is ES

小弟调调™ 4 Jul 20, 2022
This repo contains resources & practice of project and files , while learning to master JS

Resources to learn JavaScript and conquer the world? Tutorials and Books JavaScript For Cats (http://jsforcats.com/) is a dead simply introduction for

abdulkareem alabi 1 Jan 6, 2022
Tints and shades generator in React.

Reactry's shades goals add option to enter hexColor by hand add option to get hexColor from clipboard add option to set one of the shades or tints as

null 9 May 26, 2022
Colormath.js - a color conversion and color manipulation library written in typescript for Node.js, Deno and Browser

Colormath.js - a color conversion and color manipulation library written in typescript for Node.js, Deno and Browser

TheSudarsanDev 8 Feb 8, 2022
Nodeparse - A lightweight, vanilla replacement for Express framework when parsing the HTTP body's data or parsing the URL parameters and queries with NodeJS.

nodeparse A lightweight, vanilla replacement for Express framework when parsing the HTTP body's data or parsing the URL parameters and queries with No

Trần Quang Kha 1 Jan 8, 2022
:rainbow: Javascript color conversion and manipulation library

color JavaScript library for immutable color conversion and manipulation with support for CSS color strings. var color = Color('#7743CE').alpha(0.5).l

Qix 4.5k Jan 3, 2023
Fast, small color manipulation and conversion for JavaScript

TinyColor JavaScript color tooling TinyColor is a small, fast library for color manipulation and conversion in JavaScript. It allows many forms of inp

Brian Grinstead 4.5k Jan 1, 2023
jQuery plugin for color manipulation and animation support.

jQuery Color Supported jQuery versions: 1.8+ Browser Support jQuery Color 3.x supports the following browsers: Desktop: Chrome: (Current - 1) and Curr

jQuery 1.6k Dec 5, 2022