@nlabs/lex 1.37.7 → 1.39.0

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/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@nlabs/lex",
3
- "version": "1.37.7",
3
+ "version": "1.39.0",
4
4
  "description": "Lex",
5
5
  "license": "MIT",
6
+ "type": "module",
6
7
  "bin": {
7
8
  "lex": "./dist/lex.js"
8
9
  },
@@ -33,120 +34,121 @@
33
34
  "ie 11"
34
35
  ],
35
36
  "scripts": {
36
- "build": "NODE_ENV=production && rm -rf dist && esbuild src/**/**.ts* src/**.ts* --platform=node --outdir=./dist --sourcemap=inline --target=node16 --format=cjs",
37
+ "build": "NODE_ENV=production && rm -rf dist && esbuild src/**/**.ts* src/**.ts* --platform=node --outdir=./dist --sourcemap=inline --target=esnext --format=esm",
37
38
  "clean": "rm -rf dist node_modules package-lock.json *.log coverage",
38
39
  "compile": "tsc -p tsconfig.build.json",
39
40
  "env": "LEX_CONFIG='{\"useTypescript\":true}'",
40
41
  "lint": "eslint ./src --ext .ts,.tsx",
41
42
  "prepublishOnly": "yarn build",
43
+ "publish:major": "npm version major && npm publish",
44
+ "publish:minor": "npm version minor && npm publish",
45
+ "publish:patch": "npm version patch && npm publish",
42
46
  "reset": "rm -rf node_modules packages-lock.json",
43
47
  "test": "yarn lint && NODE_ENV=test && yarn env && jest",
44
48
  "update": "yarn upgradeInteractive --latest",
45
49
  "watch": "NODE_ENV=development rm -rf dist && yarn compile -w"
46
50
  },
47
51
  "dependencies": {
48
- "@luckycatfactory/esbuild-graphql-loader": "^3.7.0",
49
- "@nlabs/esbuild-jest": "^1.37.6",
52
+ "@luckycatfactory/esbuild-graphql-loader": "^3.8.1",
53
+ "@nlabs/esbuild-jest": "^1.37.8",
50
54
  "@nlabs/gothamjs": "^0.8.2",
51
55
  "@nlabs/webpack-plugin-static-site": "^0.1.1",
52
- "acorn": "^8.7.0",
56
+ "acorn": "^8.8.2",
53
57
  "acorn-dynamic-import": "^4.0.0",
54
58
  "assert": "^2.0.0",
55
- "boxen": "5.1.2",
56
- "caniuse-lite": "1.0.30001366",
57
- "chalk": "^4.1.2",
58
- "commander": "^8.2.0",
59
- "compare-versions": "^4.1.3",
60
- "compression-webpack-plugin": "^9.2.0",
59
+ "boxen": "7.0.2",
60
+ "caniuse-lite": "1.0.30001469",
61
+ "chalk": "^5.2.0",
62
+ "commander": "^10.0.0",
63
+ "compare-versions": "^6.0.0-rc.1",
64
+ "compression-webpack-plugin": "^10.0.0",
61
65
  "config-webpack-plugin": "^1.1.0",
62
- "copy-webpack-plugin": "^10.2.4",
63
- "core-js": "^3.21.1",
66
+ "copy-webpack-plugin": "^11.0.0",
67
+ "core-js": "^3.29.1",
64
68
  "crypto-browserify": "^3.12.0",
65
- "css-loader": "^6.7.1",
66
- "cssnano": "^5.1.5",
67
- "dotenv-webpack": "^7.1.0",
69
+ "css-loader": "^6.7.3",
70
+ "cssnano": "^5.1.15",
71
+ "dotenv-webpack": "^8.0.1",
68
72
  "download-npm-package": "^3.1.12",
69
- "esbuild": "^0.14.48",
70
- "esbuild-loader": "^2.18.0",
71
- "execa": "5.1.1",
73
+ "esbuild": "^0.17.12",
74
+ "esbuild-loader": "^3.0.1",
75
+ "execa": "7.1.1",
72
76
  "exports-loader": "^4.0.0",
73
- "favicons-webpack-plugin": "^5.0.2",
77
+ "favicons-webpack-plugin": "^6.0.0",
74
78
  "file-loader": "^6.2.0",
75
79
  "find-file-up": "^2.0.1",
76
- "fs-extra": "^10.0.1",
77
- "glob": "^8.0.3",
78
- "graphql": "^16.3.0",
80
+ "glob": "^9.3.1",
81
+ "graphql": "^16.6.0",
79
82
  "graphql-tag": "^2.12.6",
80
- "html-loader": "^3.1.0",
83
+ "html-loader": "^4.2.0",
81
84
  "html-webpack-plugin": "^5.5.0",
82
85
  "https-browserify": "^1.0.0",
83
- "imports-loader": "^4.0.0",
84
- "jest": "^28.1.2",
85
- "jest-circus": "^28.1.2",
86
- "jest-cli": "^28.1.2",
87
- "jest-environment-jsdom": "^28.1.2",
86
+ "imports-loader": "^4.0.1",
87
+ "jest": "^29.5.0",
88
+ "jest-circus": "^29.5.0",
89
+ "jest-cli": "^29.5.0",
90
+ "jest-environment-jsdom": "^29.5.0",
88
91
  "jest-transform-graphql": "^2.1.0",
89
92
  "json-d-ts": "^1.0.1",
90
- "latest-version": "5.1.0",
93
+ "latest-version": "7.0.0",
91
94
  "lodash": "^4.17.21",
92
- "luxon": "^3.0.1",
95
+ "luxon": "^3.3.0",
93
96
  "net": "^1.0.2",
94
- "npm-check-updates": "^15.2.1",
95
- "ora": "5.4.1",
97
+ "npm-check-updates": "^16.7.13",
98
+ "ora": "6.2.0",
96
99
  "os-browserify": "^0.3.0",
97
100
  "path-browserify": "^1.0.1",
98
101
  "postcss-browser-reporter": "^0.6.0",
99
- "postcss-cli": "^10.0.0",
100
- "postcss-custom-properties": "^12.1.5",
102
+ "postcss-cli": "^10.1.0",
103
+ "postcss-custom-properties": "^13.1.4",
101
104
  "postcss-flexbugs-fixes": "^5.0.2",
102
105
  "postcss-for": "^2.1.1",
103
106
  "postcss-hash": "^3.0.0",
104
- "postcss-import": "14.1.0",
105
- "postcss-loader": "^7.0.0",
106
- "postcss-nesting": "^10.1.3",
107
+ "postcss-import": "15.1.0",
108
+ "postcss-loader": "^7.1.0",
109
+ "postcss-nesting": "^11.2.1",
107
110
  "postcss-percentage": "^0.0.0",
108
- "postcss-preset-env": "^7.4.3",
109
- "postcss-simple-vars": "^6.0.3",
111
+ "postcss-preset-env": "^8.0.1",
112
+ "postcss-simple-vars": "^7.0.1",
110
113
  "postcss-svgo": "5.1.0",
111
114
  "postcss-url": "10.1.3",
112
115
  "process": "^0.11.10",
113
116
  "react": "^18.0.0",
114
117
  "react-dom": "^18.0.0",
115
- "regenerator-runtime": "^0.13.9",
118
+ "regenerator-runtime": "^0.13.11",
116
119
  "resolve": "^1.22.0",
117
- "rimraf": "^3.0.2",
118
- "semver": "^7.3.5",
119
- "source-map-loader": "^4.0.0",
120
+ "rimraf": "^4.4.0",
121
+ "semver": "^7.3.8",
122
+ "source-map-loader": "^4.0.1",
120
123
  "source-map-support": "^0.5.21",
121
124
  "speed-measure-webpack-plugin": "^1.5.0",
122
125
  "static-site-generator-webpack-plugin": "^3.4.2",
123
126
  "stream-browserify": "^3.0.0",
124
127
  "stream-http": "^3.2.0",
125
- "style-loader": "^3.3.1",
128
+ "style-loader": "^3.3.2",
126
129
  "svg-spritemap-webpack-plugin": "^4.4.0",
127
- "svgo": "2.8.0",
130
+ "svgo": "3.0.2",
128
131
  "tls": "^0.0.1",
129
- "typescript": "^4.6.3",
132
+ "typescript": "^5.0.2",
130
133
  "url-loader": "^4.1.1",
131
- "util": "^0.12.4",
132
- "webpack": "5.73.0",
133
- "webpack-bundle-analyzer": "^4.5.0",
134
- "webpack-cli": "^4.9.2",
134
+ "util": "^0.12.5",
135
+ "webpack": "5.76.3",
136
+ "webpack-bundle-analyzer": "^4.8.0",
137
+ "webpack-cli": "^5.0.1",
135
138
  "webpack-merge": "^5.8.0",
136
139
  "webpack-nano": "^1.1.1",
137
140
  "webpack-plugin-serve": "^1.6.0"
138
141
  },
139
142
  "devDependencies": {
140
- "@nlabs/execa-mock": "^1.37.0",
141
- "@types/jest": "^28.1.4",
142
- "@types/luxon": "^2.3.1",
143
- "@types/node": "^18.0.3",
143
+ "@nlabs/execa-mock": "^1.37.8",
144
+ "@types/jest": "^29.5.0",
145
+ "@types/luxon": "^3.2.0",
146
+ "@types/node": "^18.15.5",
144
147
  "@types/ora": "^3.2.0",
145
- "@types/react": "^18.0.15",
148
+ "@types/react": "^18.0.28",
146
149
  "@types/webpack": "^5.28.0",
147
- "eslint": "^8.12.0",
148
- "eslint-config-styleguidejs": "^3.0.0",
149
- "lerna": "^5.1.8"
150
+ "eslint": "^8.36.0",
151
+ "eslint-config-styleguidejs": "^3.2.1"
150
152
  },
151
- "gitHead": "d696dd08f3a66fa7e1236767dc0c82e62ab56d7d"
153
+ "gitHead": "0f5fb22fc0f0ab1abab5adf62afed24c7c87e4a8"
152
154
  }
@@ -0,0 +1,30 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "allowSyntheticDefaultImports": true,
5
+ "declaration": true,
6
+ "esModuleInterop": true,
7
+ "forceConsistentCasingInFileNames": true,
8
+ "inlineSourceMap": true,
9
+ "jsx": "react-native",
10
+ "lib": [
11
+ "es2019"
12
+ ],
13
+ "module": "commonjs",
14
+ "moduleResolution": "node",
15
+ "noEmit": true,
16
+ "noFallthroughCasesInSwitch": true,
17
+ "noImplicitReturns": true,
18
+ "noImplicitThis": true,
19
+ "noUnusedLocals": false,
20
+ "pretty": true,
21
+ "removeComments": true,
22
+ "resolveJsonModule": true,
23
+ "skipLibCheck": true,
24
+ "target": "esnext",
25
+ "types": [
26
+ "jest",
27
+ "react-native"
28
+ ]
29
+ }
30
+ }
File without changes
@@ -17,7 +17,6 @@
17
17
  "noFallthroughCasesInSwitch": true,
18
18
  "noImplicitReturns": true,
19
19
  "noImplicitThis": true,
20
- "noStrictGenericChecks": true,
21
20
  "noUnusedLocals": false,
22
21
  "pretty": true,
23
22
  "removeComments": true,
package/webpack.config.js CHANGED
@@ -51,6 +51,7 @@ const plugins = [
51
51
  ];
52
52
 
53
53
  const isWeb = (preset || targetEnvironment) === 'web';
54
+ const isReactNative = preset === 'react-native';
54
55
 
55
56
  if(isWeb) {
56
57
  plugins.push(
@@ -173,6 +174,7 @@ module.exports = (webpackEnv, webpackOptions) => {
173
174
  entry: {
174
175
  index: `${sourceFullPath}/${lexConfig.entryJs}`
175
176
  },
177
+ externals: isReactNative ? {'react-native': true} : undefined,
176
178
  ignoreWarnings: [/Failed to parse source map/],
177
179
  mode: isProduction ? 'production' : 'development',
178
180
  module: {
@@ -192,7 +194,7 @@ module.exports = (webpackEnv, webpackOptions) => {
192
194
  },
193
195
  {
194
196
  exclude: [
195
- /(node_modules)/,
197
+ /node_modules\/(?!(react-native))/,
196
198
  `${sourceFullPath}/**/*.test.js*`,
197
199
  `${sourceFullPath}/**/*.test.ts*`
198
200
  ],
@@ -322,7 +324,6 @@ module.exports = (webpackEnv, webpackOptions) => {
322
324
  fallback: {
323
325
  assert: require.resolve('assert/'),
324
326
  crypto: require.resolve('crypto-browserify'),
325
- fs: require.resolve('fs-extra'),
326
327
  http: require.resolve('stream-http'),
327
328
  https: require.resolve('https-browserify'),
328
329
  os: require.resolve('os-browserify/browser'),
@@ -1,70 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var commands_exports = {};
19
- __export(commands_exports, {
20
- build: () => import_build.build,
21
- clean: () => import_clean.clean,
22
- compile: () => import_compile.compile,
23
- config: () => import_config.config,
24
- create: () => import_create.create,
25
- dev: () => import_dev.dev,
26
- init: () => import_init.init,
27
- linked: () => import_link.linked,
28
- lint: () => import_lint.lint,
29
- migrate: () => import_migrate.migrate,
30
- publish: () => import_publish.publish,
31
- test: () => import_test.test,
32
- update: () => import_update.update,
33
- upgrade: () => import_upgrade.upgrade,
34
- versions: () => import_versions.versions
35
- });
36
- module.exports = __toCommonJS(commands_exports);
37
- var import_build = require("./build");
38
- var import_clean = require("./clean");
39
- var import_compile = require("./compile");
40
- var import_config = require("./config");
41
- var import_create = require("./create");
42
- var import_dev = require("./dev");
43
- var import_init = require("./init");
44
- var import_link = require("./link");
45
- var import_lint = require("./lint");
46
- var import_migrate = require("./migrate");
47
- var import_publish = require("./publish");
48
- var import_test = require("./test");
49
- var import_update = require("./update");
50
- var import_upgrade = require("./upgrade");
51
- var import_versions = require("./versions");
52
- // Annotate the CommonJS export names for ESM import in node:
53
- 0 && (module.exports = {
54
- build,
55
- clean,
56
- compile,
57
- config,
58
- create,
59
- dev,
60
- init,
61
- linked,
62
- lint,
63
- migrate,
64
- publish,
65
- test,
66
- update,
67
- upgrade,
68
- versions
69
- });
70
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL2NvbW1hbmRzL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxOC1QcmVzZW50LCBOaXRyb2dlbiBMYWJzLCBJbmMuXG4gKiBDb3B5cmlnaHRzIGxpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgTGljZW5zZS4gU2VlIHRoZSBhY2NvbXBhbnlpbmcgTElDRU5TRSBmaWxlIGZvciB0ZXJtcy5cbiAqL1xuZXhwb3J0IHtidWlsZH0gZnJvbSAnLi9idWlsZCc7XG5leHBvcnQge2NsZWFufSBmcm9tICcuL2NsZWFuJztcbmV4cG9ydCB7Y29tcGlsZX0gZnJvbSAnLi9jb21waWxlJztcbmV4cG9ydCB7Y29uZmlnfSBmcm9tICcuL2NvbmZpZyc7XG5leHBvcnQge2NyZWF0ZX0gZnJvbSAnLi9jcmVhdGUnO1xuZXhwb3J0IHtkZXZ9IGZyb20gJy4vZGV2JztcbmV4cG9ydCB7aW5pdH0gZnJvbSAnLi9pbml0JztcbmV4cG9ydCB7bGlua2VkfSBmcm9tICcuL2xpbmsnO1xuZXhwb3J0IHtsaW50fSBmcm9tICcuL2xpbnQnO1xuZXhwb3J0IHttaWdyYXRlfSBmcm9tICcuL21pZ3JhdGUnO1xuZXhwb3J0IHtwdWJsaXNofSBmcm9tICcuL3B1Ymxpc2gnO1xuZXhwb3J0IHt0ZXN0fSBmcm9tICcuL3Rlc3QnO1xuZXhwb3J0IHt1cGRhdGV9IGZyb20gJy4vdXBkYXRlJztcbmV4cG9ydCB7dXBncmFkZX0gZnJvbSAnLi91cGdyYWRlJztcbmV4cG9ydCB7dmVyc2lvbnN9IGZyb20gJy4vdmVyc2lvbnMnO1xuIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUlBLG1CQUFvQjtBQUNwQixtQkFBb0I7QUFDcEIscUJBQXNCO0FBQ3RCLG9CQUFxQjtBQUNyQixvQkFBcUI7QUFDckIsaUJBQWtCO0FBQ2xCLGtCQUFtQjtBQUNuQixrQkFBcUI7QUFDckIsa0JBQW1CO0FBQ25CLHFCQUFzQjtBQUN0QixxQkFBc0I7QUFDdEIsa0JBQW1CO0FBQ25CLG9CQUFxQjtBQUNyQixxQkFBc0I7QUFDdEIsc0JBQXVCOyIsCiAgIm5hbWVzIjogW10KfQo=