tailwindcss/oxide/crates/node/package.json

49 lines
1.3 KiB
JSON
Raw Permalink Normal View History

Oxide (#10252) * temporarily disable workflows * add oxide Our Rust related parts * use oxide - Setup the codebase to be able to use the Rust parts based on an environment variable: `OXIDE=1`. - Setup some tests that run both the non-Rust and Rust version in the same test. - Sort the candidates in a consistent way, to guarantee the order for now (especially in tests). - Reflect sorting related changes in tests. - Ensure tests run in both the Rust and non-Rust version. (Some tests are explicitly skipped when using the Rust version since we haven't implemented those features yet. These include: custom prefix, transformers and extractors). - `jest` -`OXIDE=1 jest` * remove into_par_iter where it doesn't make sense * cargo fmt * wip * enable tracing based on `DEBUG` env * improve CI for the Oxide build * sort test output This happened because the sorting happens in this branch, but changes happened on the `master` branch. * add failing tests I noticed that some of the tests were failing, and while looking at them, it happened because the tests were structured like this: ```html <div class=" backdrop-filter backdrop-filter-none backdrop-blur-lg backdrop-brightness-50 backdrop-contrast-0 backdrop-grayscale backdrop-hue-rotate-90 backdrop-invert backdrop-opacity-75 backdrop-saturate-150 backdrop-sepia " ></div> ``` This means that the class names themselves eventually end up like this: `backdrop-filter-none\n` -> (Notice the `\n`) /cc @thecrypticace * fix range to include `\n` * Include only unique values for tests Really, what we care about most is that the list contains every expected candidate. Not necessarily how many times it shows up because while many candidates will show up A LOT in a source text we’ll unique them before passing them back to anything that needs them * Fix failing tests * Don’t match empty arbitrary values * skip tests in oxide mode regarding custom separators in arbitrary variants * re-enable workflows * use `@tailwindcss/oxide` dependency * publish `tailwindcss@oxide` * drop prepublishOnly I don't think we actually need this anymore (or even want because this is trying to do things in CI that we don't want to happen. Aka, build the Oxide Rust code, it is already a dependency). * WIP * Defer to existing CLI for Oxide * Include new compiled typescript stuff when publishing * Move TS to ./src/oxide * Update scripts * Clean up tests for TS * copy `cli` to `oxide/cli` * make CLI files TypeScript files * drop --postcss flag * setup lightningcss * Remove autoprefixer and cssnano from oxide CLI * cleanup Rust code a little bit - Drop commented out code - Drop 500 fixture templates * sort test output * re-add `prepublishOnly` script * bump SWC dependencies in package-lock.json * pin `@swc` dependencies * ensure to install and build oxide * update all GitHub Workflows to reflect Oxide required changes * sort `content-resolution` integration tests * add `Release Insiders — Oxide` * setup turbo repo + remote caching * use `npx` to invoke `turbo` * setup unique/proper package names for integration tests * add missing `isomorphic-fetch` dependency * setup integration tests to use `turborepo` * scope tailwind tasks to root workspace * re-enable `node_modules` cache for integration tests * re-enable `node_modules` cache for main CI workflow * split cache for `main` and `oxide` node_modules * fix indent * split install dependencies so that they can be cached individually * improve GitHub actions caching * use correct path for oxide node_modules (crates/node) * ensure that `cargo install` always succeeds cargo install X, on CI will fail if it already exists. * figure out integration tests with turbo * tmp: use `npm` instead of `turbo` * disable `fail-fast` This will allow us to run integration tests so that it still caches the succesful ones. * YAML OH YAML, Y U WHITESPACE SENSITIVE * copy the oxide-ci workflow to release-oxide * make `oxide-ci` a normal CI workflow Without publishing * try to cache cargo and node_modules for the oxide build * configure turbo to run scripts in the root * explicitly skip failing test for the Oxide version * run oxide tests in CI * only use build script for root package * sync package-lock.json * do not cache node_modules for each individual integration * look for hoisted `.bin` * use turbo for caching build tailwind css in integration tests * Robin... * try to use the local binary first * skip installing integration test dependencies Should already be installed due to workspace usage * Robin... * drop `output.clean` * explicitly add `mini-css-extract-plugin` * drop oxide-ci, this is tested by proxy * ensure oxide build is used in integration tests This will ensure the `@tailwindcss/oxide` dependency is available (whether we use it or not). * setup Oxide shim in insiders release * add browserslist dependency * use `install:all` script name Just using `install` as a script name will be called when running `npm install`. Now that we marked the repo as a `workspace`, `npm install` will run install in all workspaces which is... not ideal. * tmp: enable insiders release in PRs Just to check if everything works before merging. Can be removed once tested. * don't cache node_modules? I feel there is some catch 22 going on here. We require `npm install` to build the `oxide/crates/node` version. But we also require `oxide/crates/node` for the `npm install` becaus of the dependency: `"@tailwindcss/oxide": "file:oxide/creates/node"` * try to use `oxide/crates/node` as part of the workspace * let's think about this Let's try and cache the `node_modules` and share as much as possible. However, some scripts still need to be installed specific to the OS. Running `npm install` locally doesn't throw away your `node_modules`, so if we just cache `node_modules` but also run `npm install` that should keep as much as possible and still improve install times since `node_modules` is already there. I think. * ensure generated `index.js` and `index.d.ts` files are considered outputs * use `npx napi` instead of `napi` directly * include all `package-lock.json` files * normalize caching further in all workflows * drop nested `package-lock.json` files * `npm uninstall mini-css-extract-plugin && npm install mini-css-extract-plugin --save-dev` * bump webpack-5 integration tests dependencies * only release insiders on `master` branch * tmp: let's figure out release insiders oxide * fix little typo * use Node 18 for Oxide Insiders * syncup package-lock.json * let's try node 16 Node 18 currently fails on `Build x86_64-unknown-linux-gnu (OXIDE)` Workflow. Install Node.JS output: ``` Environment details Warning: /__t/node/18.13.0/x64/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /__t/node/18.13.0/x64/bin/node) Warning: node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node) node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node) ``` * bump some Node versions * only release oxide insiders on `master` branch * don't cache `npm` * bump napi-rs Co-authored-by: Jordan Pittman <jordan@cryptica.me> Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-01-13 12:22:00 +01:00
{
"name": "@tailwindcss/oxide",
"version": "0.0.0",
"main": "index.js",
"types": "index.d.ts",
"napi": {
"name": "tailwindcss-oxide",
"triples": {
"additional": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"armv7-unknown-linux-gnueabihf",
"x86_64-unknown-linux-musl",
"x86_64-unknown-freebsd",
"i686-pc-windows-msvc"
]
}
},
"license": "MIT",
"devDependencies": {
[Oxide] Automatic content detection (#11173) * resolve all _existing_ content paths * pin `@napi-rs/cli` * WIP: Log all resolved content files/globs * only filter out raw changed content in non-auto mode * skip parseCandidateFiles cache in `auto` mode * improve algorithm of detecting content paths 1. Files in the root should be listed statically instead of using globs. 2. Files and folders in special known direct child folders should be listed statically instead of using globs (e.g.: `public`). This is because these special folders are often used to store generated AND source files at the same time. Using globs could trigger infinite loops because we are watching and acting upon dist files. 3. All file extensions found in the project, should be used in the globs in addition to a known set of extensions. 4. Direct folders seen from the root, can use the glob syntax `<root>/src/**/*.{...known-extensions}` * inline wanted-extensions Not 100% convinced yet, but seems cleaner so far. * ensure writing an file also makes the parent folder(s) * add integration tests for the auto content feature * add pnpm and bun lock files * Revert "inline wanted-extensions" This reverts commit 879c1248524e84216125f4a24e0160b40736333a. * sort binary-extensions and add lockb * sort + add `lock` to ignored extensions * drop `yarn.lock`, because lock extensions are already covered * group template extensions This will make it a bit easier to organize in the future. * drop empty lines and commented lines from template-extensions * skip the config path when resolving template files The config file will automatically trigger a rebuild when this file is changed. However, this should not be part of the template files because that could cause additional css that's not being used. * make `auto content` the default in the oxide engine - In the oxide engine, the default `content: []` will be dropped from the default configuration (config.simple.js, config.full.js). - If you have `content: []` or `content: { files: [] }` then the auto content feature won't be active. However if those arrays are empty a warning will still be shown. Adding files/globs or dropping the `content` section completely will enable auto content. * only test the auto content integration test in the oxide engine * set `content.files` to `auto` instead of using `auto: boolean` This way we don't run into the issue where the `config.content.files` is set and the `config.content.auto` is set to true. * drop log * ensure we validate the config in the CLI * show experimental warning for automatic content detection * use cached version of the getCandidateFiles instead of bypassing it * use `is_empty()` shorthand Thanks, Clippy! * add test to ensure nested ignored folders are not scanned * add `tempfile` for tests * add auto content tests in Rust * refactor auto content detection This will also make sure that if we have (deeply) nested ignored folders, then we won't use deeply nested globs (**/*.{js,html}) for the parent(s) of the nested ignored folders but instead use a shallow glob for each directory (*/*.{js,html}). Then each sibling directory of the parent can use deeply nested globs again except for the direct parent. * use consistent comments * ensure ignored static listed files are not present * improve performance by ~30x On a big test project this goes from ~6s to ~200ms * improve performance by ~5x We started with a ~6s duration Then in the previous commit, we improved it by ~30x and it went down to ~200ms Now with this change, it takes about ~40ms. That's another ~5x improvement. Or in total a ~150x improvement. * ensure nested folders in `public/` are also explicitly listed * add shortcut for normalizing files This is only called once so won't do anything to the main performance of Tailwind CSS. But always nice to make small performance improvements! * run Rust tests in CI * fix lint warnings * update changelog * Update CHANGELOG.md --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-05-12 10:13:29 -04:00
"@napi-rs/cli": "2.15.2"
Oxide (#10252) * temporarily disable workflows * add oxide Our Rust related parts * use oxide - Setup the codebase to be able to use the Rust parts based on an environment variable: `OXIDE=1`. - Setup some tests that run both the non-Rust and Rust version in the same test. - Sort the candidates in a consistent way, to guarantee the order for now (especially in tests). - Reflect sorting related changes in tests. - Ensure tests run in both the Rust and non-Rust version. (Some tests are explicitly skipped when using the Rust version since we haven't implemented those features yet. These include: custom prefix, transformers and extractors). - `jest` -`OXIDE=1 jest` * remove into_par_iter where it doesn't make sense * cargo fmt * wip * enable tracing based on `DEBUG` env * improve CI for the Oxide build * sort test output This happened because the sorting happens in this branch, but changes happened on the `master` branch. * add failing tests I noticed that some of the tests were failing, and while looking at them, it happened because the tests were structured like this: ```html <div class=" backdrop-filter backdrop-filter-none backdrop-blur-lg backdrop-brightness-50 backdrop-contrast-0 backdrop-grayscale backdrop-hue-rotate-90 backdrop-invert backdrop-opacity-75 backdrop-saturate-150 backdrop-sepia " ></div> ``` This means that the class names themselves eventually end up like this: `backdrop-filter-none\n` -> (Notice the `\n`) /cc @thecrypticace * fix range to include `\n` * Include only unique values for tests Really, what we care about most is that the list contains every expected candidate. Not necessarily how many times it shows up because while many candidates will show up A LOT in a source text we’ll unique them before passing them back to anything that needs them * Fix failing tests * Don’t match empty arbitrary values * skip tests in oxide mode regarding custom separators in arbitrary variants * re-enable workflows * use `@tailwindcss/oxide` dependency * publish `tailwindcss@oxide` * drop prepublishOnly I don't think we actually need this anymore (or even want because this is trying to do things in CI that we don't want to happen. Aka, build the Oxide Rust code, it is already a dependency). * WIP * Defer to existing CLI for Oxide * Include new compiled typescript stuff when publishing * Move TS to ./src/oxide * Update scripts * Clean up tests for TS * copy `cli` to `oxide/cli` * make CLI files TypeScript files * drop --postcss flag * setup lightningcss * Remove autoprefixer and cssnano from oxide CLI * cleanup Rust code a little bit - Drop commented out code - Drop 500 fixture templates * sort test output * re-add `prepublishOnly` script * bump SWC dependencies in package-lock.json * pin `@swc` dependencies * ensure to install and build oxide * update all GitHub Workflows to reflect Oxide required changes * sort `content-resolution` integration tests * add `Release Insiders — Oxide` * setup turbo repo + remote caching * use `npx` to invoke `turbo` * setup unique/proper package names for integration tests * add missing `isomorphic-fetch` dependency * setup integration tests to use `turborepo` * scope tailwind tasks to root workspace * re-enable `node_modules` cache for integration tests * re-enable `node_modules` cache for main CI workflow * split cache for `main` and `oxide` node_modules * fix indent * split install dependencies so that they can be cached individually * improve GitHub actions caching * use correct path for oxide node_modules (crates/node) * ensure that `cargo install` always succeeds cargo install X, on CI will fail if it already exists. * figure out integration tests with turbo * tmp: use `npm` instead of `turbo` * disable `fail-fast` This will allow us to run integration tests so that it still caches the succesful ones. * YAML OH YAML, Y U WHITESPACE SENSITIVE * copy the oxide-ci workflow to release-oxide * make `oxide-ci` a normal CI workflow Without publishing * try to cache cargo and node_modules for the oxide build * configure turbo to run scripts in the root * explicitly skip failing test for the Oxide version * run oxide tests in CI * only use build script for root package * sync package-lock.json * do not cache node_modules for each individual integration * look for hoisted `.bin` * use turbo for caching build tailwind css in integration tests * Robin... * try to use the local binary first * skip installing integration test dependencies Should already be installed due to workspace usage * Robin... * drop `output.clean` * explicitly add `mini-css-extract-plugin` * drop oxide-ci, this is tested by proxy * ensure oxide build is used in integration tests This will ensure the `@tailwindcss/oxide` dependency is available (whether we use it or not). * setup Oxide shim in insiders release * add browserslist dependency * use `install:all` script name Just using `install` as a script name will be called when running `npm install`. Now that we marked the repo as a `workspace`, `npm install` will run install in all workspaces which is... not ideal. * tmp: enable insiders release in PRs Just to check if everything works before merging. Can be removed once tested. * don't cache node_modules? I feel there is some catch 22 going on here. We require `npm install` to build the `oxide/crates/node` version. But we also require `oxide/crates/node` for the `npm install` becaus of the dependency: `"@tailwindcss/oxide": "file:oxide/creates/node"` * try to use `oxide/crates/node` as part of the workspace * let's think about this Let's try and cache the `node_modules` and share as much as possible. However, some scripts still need to be installed specific to the OS. Running `npm install` locally doesn't throw away your `node_modules`, so if we just cache `node_modules` but also run `npm install` that should keep as much as possible and still improve install times since `node_modules` is already there. I think. * ensure generated `index.js` and `index.d.ts` files are considered outputs * use `npx napi` instead of `napi` directly * include all `package-lock.json` files * normalize caching further in all workflows * drop nested `package-lock.json` files * `npm uninstall mini-css-extract-plugin && npm install mini-css-extract-plugin --save-dev` * bump webpack-5 integration tests dependencies * only release insiders on `master` branch * tmp: let's figure out release insiders oxide * fix little typo * use Node 18 for Oxide Insiders * syncup package-lock.json * let's try node 16 Node 18 currently fails on `Build x86_64-unknown-linux-gnu (OXIDE)` Workflow. Install Node.JS output: ``` Environment details Warning: /__t/node/18.13.0/x64/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /__t/node/18.13.0/x64/bin/node) /__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /__t/node/18.13.0/x64/bin/node) Warning: node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node) node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node) ``` * bump some Node versions * only release oxide insiders on `master` branch * don't cache `npm` * bump napi-rs Co-authored-by: Jordan Pittman <jordan@cryptica.me> Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-01-13 12:22:00 +01:00
},
"engines": {
"node": ">= 10"
},
"files": [
"index.js",
"index.d.ts"
],
"scripts": {
"artifacts": "npx napi artifacts",
"build": "npx napi build --platform --release",
"build:debug": "npx napi build --platform",
"version": "npx napi version"
},
"optionalDependencies": {
"@tailwindcss/oxide-darwin-arm64": "0.0.0",
"@tailwindcss/oxide-darwin-x64": "0.0.0",
"@tailwindcss/oxide-freebsd-x64": "0.0.0",
"@tailwindcss/oxide-linux-arm-gnueabihf": "0.0.0",
"@tailwindcss/oxide-linux-arm64-gnu": "0.0.0",
"@tailwindcss/oxide-linux-arm64-musl": "0.0.0",
"@tailwindcss/oxide-linux-x64-gnu": "0.0.0",
"@tailwindcss/oxide-linux-x64-musl": "0.0.0",
"@tailwindcss/oxide-win32-x64-msvc": "0.0.0"
}
}