@nrwl/remix 14.4.2 → 14.7.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.
@@ -0,0 +1,54 @@
1
+ {
2
+ "schematics": {
3
+ "update-tsconfig-and-remix-config-for-1-6-8": {
4
+ "version": "14.5.4",
5
+ "cli": "nx",
6
+ "description": "Update tsconfig.json and tsconfig.json to enable import of workspace libs",
7
+ "factory": "./src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8"
8
+ }
9
+
10
+ },
11
+ "packageJsonUpdates": {
12
+ "14.5.4": {
13
+ "version": "14.5.4",
14
+ "packages": {
15
+ "@remix-run/react": {
16
+ "version": "^1.6.8",
17
+ "alwaysAddToPackageJson": true
18
+ },
19
+ "@remix-run/node": {
20
+ "version": "^1.6.8",
21
+ "alwaysAddToPackageJson": true
22
+ },
23
+ "@remix-run/serve": {
24
+ "version": "^1.6.8",
25
+ "alwaysAddToPackageJson": true
26
+ },
27
+ "@remix-run/dev": {
28
+ "version": "^1.6.8",
29
+ "alwaysAddToPackageJson": true
30
+ },
31
+ "@remix-run/eslint-config": {
32
+ "version": "^1.6.8",
33
+ "alwaysAddToPackageJson": true
34
+ },
35
+ "react": {
36
+ "version": "^18.2.0",
37
+ "alwaysAddToPackageJson": true
38
+ },
39
+ "react-dom": {
40
+ "version": "^18.2.0",
41
+ "alwaysAddToPackageJson": true
42
+ },
43
+ "@types/react-dom": {
44
+ "version": "^18.0.6",
45
+ "alwaysAddToPackageJson": true
46
+ },
47
+ "@types/react": {
48
+ "version": "^18.0.15",
49
+ "alwaysAddToPackageJson": true
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
package/package.json CHANGED
@@ -1,13 +1,17 @@
1
1
  {
2
2
  "name": "@nrwl/remix",
3
- "version": "14.4.2",
3
+ "version": "14.7.0",
4
4
  "main": "src/index.js",
5
5
  "generators": "./generators.json",
6
6
  "dependencies": {
7
- "@nrwl/devkit": "^14.4.2",
8
- "@nrwl/js": "^14.4.2",
9
- "@nrwl/react": "^14.4.2",
7
+ "@nrwl/devkit": "^14.5.0",
8
+ "@nrwl/js": "^14.5.0",
9
+ "@nrwl/react": "^14.5.0",
10
10
  "tslib": "^2.3.1"
11
11
  },
12
+ "ng-update": {
13
+ "requirements": {},
14
+ "migrations": "./migrations.json"
15
+ },
12
16
  "typings": "./src/index.d.ts"
13
- }
17
+ }
@@ -16,19 +16,21 @@ function default_1(tree, _options) {
16
16
  tags: options.parsedTags,
17
17
  });
18
18
  const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {
19
- '@remix-run/react': '^1.0.6',
20
- react: '^17.0.2',
21
- 'react-dom': '^17.0.2',
22
- remix: '^1.0.6',
23
- '@remix-run/serve': '^1.0.6',
19
+ '@remix-run/react': '^1.6.8',
20
+ '@remix-run/node': '^1.6.8',
21
+ react: '^18.2.0',
22
+ 'react-dom': '^18.2.0',
23
+ '@remix-run/serve': '^1.6.8',
24
24
  }, {
25
- '@remix-run/dev': '^1.0.6',
26
- '@types/react': '^17.0.24',
27
- '@types/react-dom': '^17.0.9',
28
- typescript: '~4.4.3',
25
+ '@remix-run/dev': '^1.6.8',
26
+ '@remix-run/eslint-config': '^1.6.8',
27
+ '@types/react': '^18.0.15',
28
+ '@types/react-dom': '^18.0.6',
29
+ eslint: '^8.20.0',
30
+ typescript: '^4.7.4',
29
31
  });
30
32
  tasks.push(installTask);
31
- (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files'), options.projectRoot, Object.assign(Object.assign({}, options), { tmpl: '' }));
33
+ (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files'), options.projectRoot, Object.assign(Object.assign({}, options), { tmpl: '', offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.projectRoot) }));
32
34
  const remixSetupCommand = 'remix setup node';
33
35
  // update package json with postinstall command
34
36
  (0, devkit_1.updateJson)(tree, 'package.json', (pkgJson) => {
@@ -1 +1 @@
1
- {"version":3,"file":"application.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":";;;AAAA,yCASsB;AAEtB,+DAA2D;AAC3D,2FAAqF;AACrF,iDAAyC;AAEzC,mBAA+B,IAAU,EAAE,QAAgC;;QACzE,MAAM,OAAO,GAAG,IAAA,oCAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE;YACjD,IAAI,EAAE,OAAO,CAAC,WAAW;YACzB,UAAU,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE;YACpC,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,OAAO,CAAC,UAAU;SACzB,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,IAAA,qCAA4B,EAC9C,IAAI,EACJ;YACE,kBAAkB,EAAE,QAAQ;YAC5B,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,SAAS;YACtB,KAAK,EAAE,QAAQ;YACf,kBAAkB,EAAE,QAAQ;SAC7B,EACD;YACE,gBAAgB,EAAE,QAAQ;YAC1B,cAAc,EAAE,UAAU;YAC1B,kBAAkB,EAAE,SAAS;YAC7B,UAAU,EAAE,QAAQ;SACrB,CACF,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAExB,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,OAAO,CAAC,EACrC,OAAO,CAAC,WAAW,kCAEd,OAAO,KACV,IAAI,EAAE,EAAE,IAEX,CAAC;QAEF,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;QAE7C,+CAA+C;QAC/C,IAAA,mBAAU,EAAC,IAAI,EAAE,cAAc,EAAE,CAAC,OAAO,EAAE,EAAE;;YAC3C,OAAO,CAAC,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,EAAE,CAAC;YACxC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE;gBAChC,OAAO,CAAC,OAAO,CAAC,WAAW,GAAG,iBAAiB,CAAC;aACjD;iBAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;gBACnE,OAAO,CAAC,OAAO,CAAC,WAAW,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,OAAO,iBAAiB,EAAE,CAAC;aACxF;YACD,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACd,IAAA,wBAAQ,EAAC,OAAO,iBAAiB,EAAE,EAAE;gBACnC,GAAG,EAAE,OAAO,CAAC,WAAW;gBACxB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACjB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,sCAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AAhED,4BAgEC"}
1
+ {"version":3,"file":"application.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":";;;AAAA,yCAUsB;AAEtB,+DAA2D;AAC3D,2FAAqF;AACrF,iDAAyC;AAEzC,mBAA+B,IAAU,EAAE,QAAgC;;QACzE,MAAM,OAAO,GAAG,IAAA,oCAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE;YACjD,IAAI,EAAE,OAAO,CAAC,WAAW;YACzB,UAAU,EAAE,GAA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AAW,OAAO,iBAAiB,EAAE,CAAC;aACxF;YACD,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACd,IAAA,wBAAQ,EAAC,OAAO,iBAAiB,EAAE,EAAE;gBACnC,GAAG,EAAE,OAAO,CAAC,WAAW;gBACxB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACjB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,sCAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AAnED,4BAmEC"}
@@ -10,14 +10,13 @@
10
10
  "start": "npx remix-serve build"
11
11
  },
12
12
  "dependencies": {
13
- "@remix-run/react": "^1.0.6",
13
+ "@remix-run/react": "^1.6.0",
14
14
  "react": "^17.0.2",
15
15
  "react-dom": "^17.0.2",
16
- "remix": "^1.0.6",
17
- "@remix-run/serve": "^1.0.6"
16
+ "@remix-run/serve": "^1.6.0"
18
17
  },
19
18
  "devDependencies": {
20
- "@remix-run/dev": "^1.0.6",
19
+ "@remix-run/dev": "^1.6.0",
21
20
  "@types/react": "^17.0.24",
22
21
  "@types/react-dom": "^17.0.9",
23
22
  "typescript": "^4.6.4"
@@ -7,4 +7,5 @@ module.exports = {
7
7
  // assetsBuildDirectory: "public/build",
8
8
  // serverBuildPath: "build/index.js",
9
9
  // publicPath: "/build/",
10
+ watchPaths: ["<%= offsetFromRoot %>libs"]
10
11
  };
@@ -1,4 +1,5 @@
1
1
  {
2
+ "extends": "<%= offsetFromRoot %>tsconfig.base.json",
2
3
  "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
3
4
  "compilerOptions": {
4
5
  "lib": ["DOM", "DOM.Iterable", "ES2019"],
@@ -11,11 +12,6 @@
11
12
  "strict": true,
12
13
  "allowJs": true,
13
14
  "forceConsistentCasingInFileNames": true,
14
- "baseUrl": ".",
15
- "paths": {
16
- "~/*": ["./app/*"]
17
- },
18
-
19
15
  // Remix takes care of building everything in `remix build`.
20
16
  "noEmit": true
21
17
  }
@@ -0,0 +1,6 @@
1
+ import { Tree } from '@nrwl/devkit';
2
+ /**
3
+ * Update tsconfig.json and remix.config.js to support importing workspaces libraries
4
+ * @param tree
5
+ */
6
+ export default function update(tree: Tree): Promise<void>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ /**
6
+ * Update tsconfig.json and remix.config.js to support importing workspaces libraries
7
+ * @param tree
8
+ */
9
+ function update(tree) {
10
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
+ const projects = (0, devkit_1.getProjects)(tree);
12
+ const remixProjects = Array.from(projects.values()).filter((project) => {
13
+ const remixConfigPath = (0, devkit_1.joinPathFragments)(project.root, 'remix.config.js');
14
+ // if the project doesn't have a remix.config.js, it's not a Remix project so we can skip it
15
+ return tree.exists(remixConfigPath);
16
+ });
17
+ if (remixProjects.length === 0)
18
+ return;
19
+ remixProjects.forEach((project) => {
20
+ const remixConfigPath = (0, devkit_1.joinPathFragments)(project.root, 'remix.config.js');
21
+ try {
22
+ const remixConfigContent = tree.read(remixConfigPath, 'utf-8');
23
+ // if watchPaths is already there, we assume this project has been updated before
24
+ if (remixConfigContent.includes('watchPaths'))
25
+ return;
26
+ const projectOffsetFromRoot = (0, devkit_1.offsetFromRoot)(project.root);
27
+ const layout = (0, devkit_1.getWorkspaceLayout)(tree);
28
+ tree.write(remixConfigPath, remixConfigContent.replace('module.exports = {\n', `module.exports = { watchPaths: ['${(0, devkit_1.joinPathFragments)(projectOffsetFromRoot, layout.libsDir)}'],\n`));
29
+ const tsConfigPath = (0, devkit_1.joinPathFragments)(project.root, 'tsconfig.json');
30
+ const tsConfigContent = (0, devkit_1.readJson)(tree, tsConfigPath);
31
+ const newTsConfigContent = Object.assign(Object.assign({}, tsConfigContent), { extends: `${projectOffsetFromRoot}tsconfig.base.json` });
32
+ delete newTsConfigContent.compilerOptions.baseUrl;
33
+ devkit_1.logger.info(`Remix apps now support importing from non-buildable libs. However, you must remove the \`paths\` configuration from the project's \`tsconfig.json\`.\n\nMigrate any import paths using \`~\` to relative path imports and then delete the \`paths\` property from \`${tsConfigPath}\``);
34
+ (0, devkit_1.writeJson)(tree, tsConfigPath, newTsConfigContent);
35
+ }
36
+ catch (err) {
37
+ devkit_1.logger.error(err);
38
+ devkit_1.logger.error(`Unable to update ${remixConfigPath} for project ${project.root}.`);
39
+ }
40
+ });
41
+ yield (0, devkit_1.formatFiles)(tree);
42
+ });
43
+ }
44
+ exports.default = update;
45
+ //# sourceMappingURL=update-tsconfig-and-remix-config-for-1-6-8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-tsconfig-and-remix-config-for-1-6-8.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.ts"],"names":[],"mappings":";;;AAAA,yCAUsB;AAEtB;;;GAGG;AACH,SAA8B,MAAM,CAAC,IAAU;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YACrE,MAAM,eAAe,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;YAC3E,4FAA4F;YAC5F,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QAEH,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAEvC,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