@workleap/postcss-configs 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,37 +1,49 @@
1
1
  # @workleap/postcss-configs
2
2
 
3
+ ## 1.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#242](https://github.com/workleap/wl-web-configs/pull/242) [`e165cb4`](https://github.com/workleap/wl-web-configs/commit/e165cb447e699e19f06d41532216e36c09d7b945) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
8
+
9
+ ## 1.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [#230](https://github.com/workleap/wl-web-configs/pull/230) [`0a4279c`](https://github.com/workleap/wl-web-configs/commit/0a4279c40b7c2ea76c7e1884a8e2fd744ca9b7c1) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Packages now includes the source codes and sourcemap.
14
+
3
15
  ## 1.0.4
4
16
 
5
17
  ### Patch Changes
6
18
 
7
- - [#186](https://github.com/gsoft-inc/wl-web-configs/pull/186) [`997054e`](https://github.com/gsoft-inc/wl-web-configs/commit/997054eb66118e5897ce686a446d98ac7ea6abd6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Loosen the dependencies version.
19
+ - [#186](https://github.com/workleap/wl-web-configs/pull/186) [`997054e`](https://github.com/workleap/wl-web-configs/commit/997054eb66118e5897ce686a446d98ac7ea6abd6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Loosen the dependencies version.
8
20
 
9
21
  ## 1.0.3
10
22
 
11
23
  ### Patch Changes
12
24
 
13
- - [#179](https://github.com/gsoft-inc/wl-web-configs/pull/179) [`61d3721`](https://github.com/gsoft-inc/wl-web-configs/commit/61d37216198083ba78cd4b1480e38c8d772a6119) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
25
+ - [#179](https://github.com/workleap/wl-web-configs/pull/179) [`61d3721`](https://github.com/workleap/wl-web-configs/commit/61d37216198083ba78cd4b1480e38c8d772a6119) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
14
26
 
15
27
  ## 1.0.2
16
28
 
17
29
  ### Patch Changes
18
30
 
19
- - [#177](https://github.com/gsoft-inc/wl-web-configs/pull/177) [`8936ce6`](https://github.com/gsoft-inc/wl-web-configs/commit/8936ce677cad205caba2f13a71f5c9208f1dd5e6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated packages dependencies.
31
+ - [#177](https://github.com/workleap/wl-web-configs/pull/177) [`8936ce6`](https://github.com/workleap/wl-web-configs/commit/8936ce677cad205caba2f13a71f5c9208f1dd5e6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated packages dependencies.
20
32
 
21
33
  ## 1.0.1
22
34
 
23
35
  ### Patch Changes
24
36
 
25
- - [#143](https://github.com/gsoft-inc/wl-web-configs/pull/143) [`334088f`](https://github.com/gsoft-inc/wl-web-configs/commit/334088fac63aad6cc245ee3300da076e5c201287) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated to SWC 1.3.85
37
+ - [#143](https://github.com/workleap/wl-web-configs/pull/143) [`334088f`](https://github.com/workleap/wl-web-configs/commit/334088fac63aad6cc245ee3300da076e5c201287) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated to SWC 1.3.85
26
38
 
27
39
  ## 1.0.0
28
40
 
29
41
  ### Major Changes
30
42
 
31
- - [#98](https://github.com/gsoft-inc/wl-web-configs/pull/98) [`56ca32e`](https://github.com/gsoft-inc/wl-web-configs/commit/56ca32ee3194c51210aacc5189f3ebbec5a4a7b6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - New start, every package has a major version bump
43
+ - [#98](https://github.com/workleap/wl-web-configs/pull/98) [`56ca32e`](https://github.com/workleap/wl-web-configs/commit/56ca32ee3194c51210aacc5189f3ebbec5a4a7b6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - New start, every package has a major version bump
32
44
 
33
45
  ## 0.0.2
34
46
 
35
47
  ### Patch Changes
36
48
 
37
- - [#92](https://github.com/gsoft-inc/wl-web-configs/pull/92) [`66e8f10`](https://github.com/gsoft-inc/wl-web-configs/commit/66e8f1033a987523c65fe9e61f53dac6d2e38777) Thanks [@ofrogon](https://github.com/ofrogon)! - Migrate project from GitHub organization
49
+ - [#92](https://github.com/workleap/wl-web-configs/pull/92) [`66e8f10`](https://github.com/workleap/wl-web-configs/commit/66e8f1033a987523c65fe9e61f53dac6d2e38777) Thanks [@ofrogon](https://github.com/ofrogon)! - Migrate project from GitHub organization
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## Usage
7
7
 
8
- View the [user's documentation](https://gsoft-inc.github.io/wl-web-configs/).
8
+ View the [user's documentation](https://workleap.github.io/wl-web-configs/).
9
9
 
10
10
  ## 🤝 Contributing
11
11
 
@@ -13,4 +13,4 @@ View the [contributor's documentation](../../CONTRIBUTING.md).
13
13
 
14
14
  ## License
15
15
 
16
- Copyright © 2023, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/workleap-license/blob/master/LICENSE.
16
+ Copyright © 2023, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/workleap/workleap-license/blob/master/LICENSE.
package/dist/index.d.ts CHANGED
@@ -1,19 +1,16 @@
1
- import { Config } from 'postcss-load-config';
2
- export { Config as PostCSSConfig } from 'postcss-load-config';
3
- import { pluginOptions } from 'postcss-preset-env';
4
-
5
- type PostcssConfigTransformer = (config: Config) => Config;
6
- declare const DefaultPresetEnvOptions: {
1
+ import type { Config as PostCSSConfig } from "postcss-load-config";
2
+ import { type pluginOptions as PostcssPresetEnvOptions } from "postcss-preset-env";
3
+ export type { PostCSSConfig };
4
+ export type PostcssConfigTransformer = (config: PostCSSConfig) => PostCSSConfig;
5
+ export declare const DefaultPresetEnvOptions: {
7
6
  autoprefixer: {
8
7
  flexbox: "no-2009";
9
8
  };
10
9
  stage: number;
11
10
  };
12
- interface DefineConfigOptions {
13
- browsers?: Required<pluginOptions["browsers"]>;
14
- presetEnvOptions?: Omit<pluginOptions, "browsers">;
11
+ export interface DefineConfigOptions {
12
+ browsers?: Required<PostcssPresetEnvOptions["browsers"]>;
13
+ presetEnvOptions?: Omit<PostcssPresetEnvOptions, "browsers">;
15
14
  transformers?: PostcssConfigTransformer[];
16
15
  }
17
- declare function defineConfig(options?: DefineConfigOptions): Config;
18
-
19
- export { DefaultPresetEnvOptions, type DefineConfigOptions, type PostcssConfigTransformer, defineConfig };
16
+ export declare function defineConfig(options?: DefineConfigOptions): PostCSSConfig;
package/dist/index.js CHANGED
@@ -1,38 +1,39 @@
1
- import postcssPresetEnv from 'postcss-preset-env';
1
+ import * as __WEBPACK_EXTERNAL_MODULE_postcss_preset_env_1c2ab66b__ from "postcss-preset-env";
2
+
3
+ ;// CONCATENATED MODULE: external "postcss-preset-env"
4
+
5
+ ;// CONCATENATED MODULE: ./src/index.ts?__rslib_entry__
2
6
 
3
- // src/index.ts
4
7
  function applyTransformers(config, transformers) {
5
- return transformers.reduce((acc, transformer) => transformer(acc), config);
8
+ return transformers.reduce((acc, transformer)=>transformer(acc), config);
6
9
  }
7
- var DefaultPresetEnvOptions = {
8
- autoprefixer: {
9
- flexbox: "no-2009"
10
- },
11
- stage: 3
10
+ const DefaultPresetEnvOptions = {
11
+ autoprefixer: {
12
+ flexbox: "no-2009"
13
+ },
14
+ stage: 3
12
15
  };
13
16
  function defineConfig(options = {}) {
14
- const {
15
- browsers,
16
- presetEnvOptions = DefaultPresetEnvOptions,
17
- transformers = []
18
- } = options;
19
- let _options = presetEnvOptions;
20
- if (browsers) {
21
- _options = {
22
- ...presetEnvOptions,
23
- browsers
17
+ const { browsers, presetEnvOptions = DefaultPresetEnvOptions, transformers = [] } = options;
18
+ let _options = presetEnvOptions;
19
+ if (browsers) {
20
+ _options = {
21
+ ...presetEnvOptions,
22
+ browsers
23
+ };
24
+ }
25
+ const config = {
26
+ plugins: [
27
+ // Typings are wrong, it's callable.
28
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
29
+ // @ts-ignore
30
+ (0,__WEBPACK_EXTERNAL_MODULE_postcss_preset_env_1c2ab66b__["default"])(_options)
31
+ ]
24
32
  };
25
- }
26
- const config = {
27
- plugins: [
28
- // Typings are wrong, it's callable.
29
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
30
- // @ts-ignore
31
- postcssPresetEnv(_options)
32
- ]
33
- };
34
- const transformedConfig = applyTransformers(config, transformers);
35
- return transformedConfig;
33
+ const transformedConfig = applyTransformers(config, transformers);
34
+ return transformedConfig;
36
35
  }
37
36
 
38
37
  export { DefaultPresetEnvOptions, defineConfig };
38
+
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["webpack://@workleap/postcss-configs/./src/index.ts"],"sourcesContent":["import type { Config as PostCSSConfig } from \"postcss-load-config\";\nimport postcssPresetEnv, { type pluginOptions as PostcssPresetEnvOptions } from \"postcss-preset-env\";\n\nexport type { PostCSSConfig };\n\nexport type PostcssConfigTransformer = (config: PostCSSConfig) => PostCSSConfig;\n\nfunction applyTransformers(config: PostCSSConfig, transformers: PostcssConfigTransformer[]) {\n return transformers.reduce((acc, transformer) => transformer(acc), config);\n}\n\nexport const DefaultPresetEnvOptions = {\n autoprefixer: {\n flexbox: \"no-2009\"\n },\n stage: 3\n} satisfies PostcssPresetEnvOptions;\n\nexport interface DefineConfigOptions {\n browsers?: Required<PostcssPresetEnvOptions[\"browsers\"]>;\n presetEnvOptions?: Omit<PostcssPresetEnvOptions, \"browsers\">;\n transformers?: PostcssConfigTransformer[];\n}\n\nexport function defineConfig(options: DefineConfigOptions = {}) {\n const {\n browsers,\n presetEnvOptions = DefaultPresetEnvOptions,\n transformers = []\n } = options;\n\n let _options: PostcssPresetEnvOptions = presetEnvOptions;\n\n if (browsers) {\n _options = {\n ...presetEnvOptions,\n browsers\n };\n }\n\n const config: PostCSSConfig = {\n plugins: [\n // Typings are wrong, it's callable.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n postcssPresetEnv(_options)\n ]\n };\n\n const transformedConfig = applyTransformers(config, transformers);\n\n return transformedConfig;\n}\n"],"names":["postcssPresetEnv","applyTransformers","config","transformers","acc","transformer","DefaultPresetEnvOptions","defineConfig","options","browsers","presetEnvOptions","_options","transformedConfig"],"mappings":";;;;;AACqG;AAMrG,SAASC,kBAAkBC,MAAqB,EAAEC,YAAwC;IACtF,OAAOA,aAAa,MAAM,CAAC,CAACC,KAAKC,cAAgBA,YAAYD,MAAMF;AACvE;AAEO,MAAMI,0BAA0B;IACnC,cAAc;QACV,SAAS;IACb;IACA,OAAO;AACX,EAAoC;AAQ7B,SAASC,aAAaC,UAA+B,CAAC,CAAC;IAC1D,MAAM,EACFC,QAAQ,EACRC,mBAAmBJ,uBAAuB,EAC1CH,eAAe,EAAE,EACpB,GAAGK;IAEJ,IAAIG,WAAoCD;IAExC,IAAID,UAAU;QACVE,WAAW;YACP,GAAGD,gBAAgB;YACnBD;QACJ;IACJ;IAEA,MAAMP,SAAwB;QAC1B,SAAS;YACL,oCAAoC;YACpC,6DAA6D;YAC7D,aAAa;YACbF,sEAAgBA,CAACW;SACpB;IACL;IAEA,MAAMC,oBAAoBX,kBAAkBC,QAAQC;IAEpD,OAAOS;AACX"}
package/package.json CHANGED
@@ -2,16 +2,15 @@
2
2
  "name": "@workleap/postcss-configs",
3
3
  "author": "Workleap",
4
4
  "description": "Workleap's recommended PostCSS configurations",
5
- "version": "1.0.4",
5
+ "version": "1.0.6",
6
6
  "license": "Apache-2.0",
7
- "keywords": [
8
- "workleap",
9
- "postcss",
10
- "css"
11
- ],
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "provenance": true
10
+ },
12
11
  "repository": {
13
12
  "type": "git",
14
- "url": "git+https://github.com/gsoft-inc/wl-web-configs.git",
13
+ "url": "git+https://github.com/workleap/wl-web-configs.git",
15
14
  "directory": "packages/postcss-configs"
16
15
  },
17
16
  "type": "module",
@@ -23,6 +22,7 @@
23
22
  }
24
23
  },
25
24
  "files": [
25
+ "src",
26
26
  "dist",
27
27
  "CHANGELOG.md",
28
28
  "README.md"
@@ -30,30 +30,26 @@
30
30
  "peerDependencies": {
31
31
  "postcss": ">=8.4.6"
32
32
  },
33
- "devDependencies": {
34
- "@swc/core": "1.4.6",
35
- "@swc/jest": "0.2.36",
36
- "@types/jest": "29.5.12",
37
- "@types/node": "20.11.25",
38
- "jest": "29.7.0",
39
- "postcss": "8.4.35",
40
- "ts-node": "10.9.2",
41
- "tsup": "8.0.2",
42
- "typescript": "5.4.2",
43
- "@workleap/eslint-plugin": "3.1.0",
44
- "@workleap/swc-configs": "2.2.3",
45
- "@workleap/tsup-configs": "3.0.4",
46
- "@workleap/typescript-configs": "3.0.2"
47
- },
48
33
  "dependencies": {
49
- "postcss-load-config": "^5.0.3",
50
- "postcss-preset-env": "^9.5.0"
34
+ "postcss-load-config": "^6.0.1",
35
+ "postcss-preset-env": "^10.1.5"
51
36
  },
52
- "publishConfig": {
53
- "access": "public",
54
- "provenance": true
37
+ "devDependencies": {
38
+ "@rsbuild/core": "1.2.19",
39
+ "@rslib/core": "0.5.4",
40
+ "@types/node": "22.13.10",
41
+ "@typescript-eslint/parser": "8.26.1",
42
+ "eslint": "8.57.0",
43
+ "typescript": "5.8.2",
44
+ "vitest": "3.0.9",
45
+ "@workleap/eslint-plugin": "3.3.1",
46
+ "@workleap/rslib-configs": "1.0.3",
47
+ "@workleap/typescript-configs": "3.0.2"
55
48
  },
56
49
  "scripts": {
57
- "build": "tsup"
50
+ "build": "rslib build -c rslib.config.ts",
51
+ "eslint": "eslint . --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint",
52
+ "typecheck": "tsc",
53
+ "test": "vitest --config vitest.config.ts --no-watch"
58
54
  }
59
55
  }
package/src/index.ts ADDED
@@ -0,0 +1,53 @@
1
+ import type { Config as PostCSSConfig } from "postcss-load-config";
2
+ import postcssPresetEnv, { type pluginOptions as PostcssPresetEnvOptions } from "postcss-preset-env";
3
+
4
+ export type { PostCSSConfig };
5
+
6
+ export type PostcssConfigTransformer = (config: PostCSSConfig) => PostCSSConfig;
7
+
8
+ function applyTransformers(config: PostCSSConfig, transformers: PostcssConfigTransformer[]) {
9
+ return transformers.reduce((acc, transformer) => transformer(acc), config);
10
+ }
11
+
12
+ export const DefaultPresetEnvOptions = {
13
+ autoprefixer: {
14
+ flexbox: "no-2009"
15
+ },
16
+ stage: 3
17
+ } satisfies PostcssPresetEnvOptions;
18
+
19
+ export interface DefineConfigOptions {
20
+ browsers?: Required<PostcssPresetEnvOptions["browsers"]>;
21
+ presetEnvOptions?: Omit<PostcssPresetEnvOptions, "browsers">;
22
+ transformers?: PostcssConfigTransformer[];
23
+ }
24
+
25
+ export function defineConfig(options: DefineConfigOptions = {}) {
26
+ const {
27
+ browsers,
28
+ presetEnvOptions = DefaultPresetEnvOptions,
29
+ transformers = []
30
+ } = options;
31
+
32
+ let _options: PostcssPresetEnvOptions = presetEnvOptions;
33
+
34
+ if (browsers) {
35
+ _options = {
36
+ ...presetEnvOptions,
37
+ browsers
38
+ };
39
+ }
40
+
41
+ const config: PostCSSConfig = {
42
+ plugins: [
43
+ // Typings are wrong, it's callable.
44
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
45
+ // @ts-ignore
46
+ postcssPresetEnv(_options)
47
+ ]
48
+ };
49
+
50
+ const transformedConfig = applyTransformers(config, transformers);
51
+
52
+ return transformedConfig;
53
+ }