neo.mjs 4.0.84 → 4.0.87

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.
@@ -1,5 +1,6 @@
1
1
  import fs from 'fs-extra';
2
2
  import path from 'path';
3
+ import webpack from 'webpack';
3
4
  import WebpackHookPlugin from 'webpack-hook-plugin';
4
5
 
5
6
  const cwd = process.cwd(),
@@ -15,6 +16,8 @@ const cwd = process.cwd(),
15
16
  faTo = path.resolve(cwd, buildTarget.folder, 'resources/fontawesome-free'),
16
17
  plugins = [];
17
18
 
19
+ let contextAdjusted = false;
20
+
18
21
  if (!insideNeo) {
19
22
  let resourcesPath = path.resolve(cwd, 'resources'),
20
23
  itemPath, target;
@@ -38,6 +41,17 @@ export default {
38
41
  target : 'web',
39
42
 
40
43
  plugins: [
44
+ // Only for the non workspace based build scope, we have to ignore workspace related addons.
45
+ // This might be a fit for webpack.ContextExclusionPlugin, but I did not get it working.
46
+ new webpack.ContextReplacementPlugin(/.*/, context => {
47
+ if (insideNeo && !contextAdjusted && path.join(context.request) === path.join('../../../src/main/addon')) {
48
+ let req = context.request.split(path.sep);
49
+ req.splice(0, 2);
50
+
51
+ context.request = req.join(path.sep);
52
+ contextAdjusted = true;
53
+ }
54
+ }),
41
55
  new WebpackHookPlugin({
42
56
  onBuildEnd: [`node ${copyFolder} -s ${faFrom} -t ${faTo}`]
43
57
  }),
@@ -1,5 +1,6 @@
1
1
  import fs from 'fs-extra';
2
2
  import path from 'path';
3
+ import webpack from 'webpack';
3
4
  import WebpackHookPlugin from 'webpack-hook-plugin';
4
5
 
5
6
  const cwd = process.cwd(),
@@ -15,6 +16,8 @@ const cwd = process.cwd(),
15
16
  faTo = path.resolve(cwd, buildTarget.folder, 'resources/fontawesome-free'),
16
17
  plugins = [];
17
18
 
19
+ let contextAdjusted = false;
20
+
18
21
  if (!insideNeo) {
19
22
  let resourcesPath = path.resolve(cwd, 'resources'),
20
23
  itemPath, target;
@@ -37,6 +40,17 @@ export default {
37
40
  target: 'web',
38
41
 
39
42
  plugins: [
43
+ // Only for the non workspace based build scope, we have to ignore workspace related addons.
44
+ // This might be a fit for webpack.ContextExclusionPlugin, but I did not get it working.
45
+ new webpack.ContextReplacementPlugin(/.*/, context => {
46
+ if (insideNeo && !contextAdjusted && path.join(context.request) === path.join('../../../src/main/addon')) {
47
+ let req = context.request.split(path.sep);
48
+ req.splice(0, 2);
49
+
50
+ context.request = req.join(path.sep);
51
+ contextAdjusted = true;
52
+ }
53
+ }),
40
54
  new WebpackHookPlugin({
41
55
  onBuildEnd: [`node ${copyFolder} -s ${faFrom} -t ${faTo}`]
42
56
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.0.84",
3
+ "version": "4.0.87",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -39,10 +39,10 @@
39
39
  },
40
40
  "homepage": "https://neomjs.github.io/pages/",
41
41
  "dependencies": {
42
- "@fortawesome/fontawesome-free": "^6.1.1",
42
+ "@fortawesome/fontawesome-free": "^6.1.2",
43
43
  "@material/mwc-button": "^0.26.1",
44
44
  "@material/mwc-textfield": "^0.26.1",
45
- "autoprefixer": "^10.4.7",
45
+ "autoprefixer": "^10.4.8",
46
46
  "chalk": "^5.0.1",
47
47
  "clean-webpack-plugin": "^4.0.0",
48
48
  "commander": "^9.4.0",
@@ -50,11 +50,11 @@
50
50
  "envinfo": "^7.8.1",
51
51
  "fs-extra": "^10.1.0",
52
52
  "highlightjs-line-numbers.js": "^2.8.0",
53
- "inquirer": "^9.0.2",
53
+ "inquirer": "^9.1.0",
54
54
  "neo-jsdoc": "^1.0.1",
55
55
  "neo-jsdoc-x": "^1.0.4",
56
56
  "postcss": "^8.4.14",
57
- "sass": "^1.54.0",
57
+ "sass": "^1.54.3",
58
58
  "webpack": "^5.74.0",
59
59
  "webpack-cli": "^4.10.0",
60
60
  "webpack-dev-server": "4.9.3",
@@ -414,7 +414,7 @@ class Base extends CoreBase {
414
414
  }, 50);
415
415
  });
416
416
  } else if (me.mounted) {
417
- me.updateVdom(vdom, me.vnode);
417
+ me.vnode && me.updateVdom(vdom, me.vnode);
418
418
  }
419
419
 
420
420
  me.hasUnmountedVdomChanges = !me.mounted && me.hasBeenMounted;
@@ -271,7 +271,7 @@ class RecordFactory extends Base {
271
271
  return new Date(value);
272
272
  }
273
273
 
274
- if (type === 'string' && value !== null) {
274
+ if (type === 'string' && value) {
275
275
  value = value + '';
276
276
  value = value.replace(/(<([^>]+)>)/ig, '');
277
277
  }