edge-functions 2.2.0-stage.3 → 2.2.0-stage.4

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,3 +1,10 @@
1
+ ## [2.2.0-stage.4](https://github.com/aziontech/vulcan/compare/v2.2.0-stage.3...v2.2.0-stage.4) (2023-12-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * app routes filter in next static build ([bb9cbd3](https://github.com/aziontech/vulcan/commit/bb9cbd3f0789ad6b0ba0fccb549223f4e5647a7b))
7
+
1
8
  ## [2.2.0-stage.3](https://github.com/aziontech/vulcan/compare/v2.2.0-stage.2...v2.2.0-stage.3) (2023-12-13)
2
9
 
3
10
 
@@ -80,7 +80,7 @@ export default function myWorker(event: FetchEvent): Response {
80
80
  },
81
81
  Angular: async (projectName, version = FrameworksDefaultVersions.Angular) => {
82
82
  await exec(
83
- `npx @angular/cli@${version} new ${projectName}`,
83
+ `npx --yes @angular/cli@${version} new ${projectName}`,
84
84
  'Angular',
85
85
  false,
86
86
  true,
@@ -88,18 +88,23 @@ export default function myWorker(event: FetchEvent): Response {
88
88
  },
89
89
  Astro: async (projectName, version = FrameworksDefaultVersions.Astro) => {
90
90
  await exec(
91
- `npx create-astro@${version} ${projectName}`,
91
+ `npx --yes create-astro@${version} ${projectName}`,
92
92
  'Astro',
93
93
  false,
94
94
  true,
95
95
  );
96
96
  },
97
97
  Hexo: async (projectName, version = FrameworksDefaultVersions.Hexo) => {
98
- await exec(`npx hexo@${version} init ${projectName}`, 'Hexo', false, true);
98
+ await exec(
99
+ `npx --yes hexo@${version} init ${projectName}`,
100
+ 'Hexo',
101
+ false,
102
+ true,
103
+ );
99
104
  },
100
105
  Next: async (projectName, version = FrameworksDefaultVersions.Next) => {
101
106
  await exec(
102
- `npx create-next-app@${version} ${projectName} && cd ${projectName} && npm i next@${version}`,
107
+ `npx --yes create-next-app@${version} ${projectName} && cd ${projectName} && npm i next@${version}`,
103
108
  'Next',
104
109
  false,
105
110
  true,
@@ -107,7 +112,7 @@ export default function myWorker(event: FetchEvent): Response {
107
112
  },
108
113
  React: async (projectName, version = FrameworksDefaultVersions.React) => {
109
114
  await exec(
110
- `npx create-react-app@${version} ${projectName}`,
115
+ `npx --yes create-react-app@${version} ${projectName}`,
111
116
  'React',
112
117
  false,
113
118
  true,
@@ -115,7 +120,7 @@ export default function myWorker(event: FetchEvent): Response {
115
120
  },
116
121
  Vue: async (projectName, version = FrameworksDefaultVersions.Vue) => {
117
122
  await exec(
118
- `npx @vue/cli@${version} create ${projectName}`,
123
+ `npx --yes @vue/cli@${version} create ${projectName}`,
119
124
  'Vue',
120
125
  false,
121
126
  true,
@@ -123,7 +128,7 @@ export default function myWorker(event: FetchEvent): Response {
123
128
  },
124
129
  Vite: async (projectName, version = FrameworksDefaultVersions.Vite) => {
125
130
  await exec(
126
- `npx create-vue@${version} ${projectName}`,
131
+ `npx --yes create-vue@${version} ${projectName}`,
127
132
  'Vue/Vite',
128
133
  false,
129
134
  true,
@@ -120,11 +120,12 @@ async function fixAppDirRoutes() {
120
120
  return;
121
121
  }
122
122
 
123
- const appPaths = Object.values(appPathRoutesManifest);
123
+ const appPagesPaths = Object.keys(appPathRoutesManifest)
124
+ .filter((pathKey) => pathKey.match(/page/))
125
+ .map((key) => appPathRoutesManifest[key]);
124
126
 
125
- const pathsToCopy = appPaths.filter(
126
- (path) =>
127
- !dynamicRoutes.includes(path) && path !== '/' && path !== '/favicon.ico',
127
+ const pathsToCopy = appPagesPaths.filter(
128
+ (path) => !dynamicRoutes.includes(path) && path !== '/',
128
129
  );
129
130
 
130
131
  // fix _next calls in client (static routes in app dir format)
@@ -14,9 +14,11 @@ describe('getPresetsList utils', () => {
14
14
  'typescript',
15
15
  'angular',
16
16
  'astro',
17
+ 'emscripten',
17
18
  'hexo',
18
19
  'next',
19
20
  'react',
21
+ 'rustwasm',
20
22
  'vue',
21
23
  ];
22
24
 
@@ -77,10 +79,12 @@ describe('getPresetsList utils', () => {
77
79
  'Typescript (Compute)',
78
80
  'Angular (Deliver)',
79
81
  'Astro (Deliver)',
82
+ 'Emscripten (Compute)',
80
83
  'Hexo (Deliver)',
81
84
  'Next (Compute)',
82
85
  'Next (Deliver)',
83
86
  'React (Deliver)',
87
+ 'Rustwasm (Compute)',
84
88
  'Vue (Deliver)',
85
89
  ];
86
90
  const beautifiedResults = presets.getBeautify();
@@ -94,9 +98,11 @@ describe('getPresetsList utils', () => {
94
98
  'typescript',
95
99
  'angular',
96
100
  'astro',
101
+ 'emscripten',
97
102
  'hexo',
98
103
  'next',
99
104
  'react',
105
+ 'rustwasm',
100
106
  'vue',
101
107
  ];
102
108
  const expectedOutput = [
@@ -105,9 +111,11 @@ describe('getPresetsList utils', () => {
105
111
  ['Compute'],
106
112
  ['Deliver'],
107
113
  ['Deliver'],
114
+ ['Compute'],
108
115
  ['Deliver'],
109
116
  ['Compute', 'Deliver'],
110
117
  ['Deliver'],
118
+ ['Compute'],
111
119
  ['Deliver'],
112
120
  ];
113
121
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edge-functions",
3
3
  "type": "module",
4
- "version": "2.2.0-stage.3",
4
+ "version": "2.2.0-stage.4",
5
5
  "description": "Tool to launch and build JavaScript/Frameworks. This tool automates polyfills for Edge Computing and assists in creating Workers, notably for the Azion platform.",
6
6
  "main": "lib/main.js",
7
7
  "bin": {
@@ -15,7 +15,7 @@
15
15
  "lint": "eslint .",
16
16
  "lint:fix": "eslint --fix .",
17
17
  "format": "prettier --write .",
18
- "test": "jest --clearCache && jest -c jest.config.unit.js lib/",
18
+ "test": "jest --clearCache && jest lib/",
19
19
  "test:watch": "jest lib/ --watch",
20
20
  "test:coverage": "jest --clearCache && jest lib/ --coverage",
21
21
  "format:check": "prettier . --check",
@@ -23,7 +23,7 @@
23
23
  "e2e:start": "tests/scripts/start-e2e-env.sh",
24
24
  "e2e:stop": "tests/scripts/stop-e2e-env.sh",
25
25
  "e2e:destroy": "tests/scripts/destroy-e2e-env.sh",
26
- "test:e2e": "yarn e2e:start && jest -c jest.config.e2e.js --maxWorkers 1 tests/e2e/ && yarn e2e:stop",
26
+ "test:e2e": "yarn e2e:start && jest --maxWorkers 1 tests/e2e/ && yarn e2e:stop",
27
27
  "prepare": "husky install"
28
28
  },
29
29
  "author": "aziontech",
@@ -38,15 +38,14 @@
38
38
  ],
39
39
  "license": "MIT",
40
40
  "dependencies": {
41
- "@angular/cli": "^16.2.0",
42
- "@babel/generator": "^7.23.0",
43
- "@babel/parser": "^7.23.0",
44
- "@babel/traverse": "^7.23.0",
45
- "@babel/types": "^7.23.0",
41
+ "@babel/generator": "^7.23.5",
42
+ "@babel/parser": "^7.23.5",
43
+ "@babel/traverse": "^7.23.5",
44
+ "@babel/types": "^7.23.5",
46
45
  "@edge-runtime/node-utils": "^2.1.1",
47
46
  "@edge-runtime/primitives": "^3.0.4",
48
- "@fastly/http-compute-js": "^1.0.0",
49
- "@vue/cli": "^5.0.8",
47
+ "@fastly/http-compute-js": "^1.1.2",
48
+ "accepts": "^1.3.8",
50
49
  "assert": "^2.0.0",
51
50
  "bottleneck": "^2.19.5",
52
51
  "browserify-zlib": "^0.2.0",
@@ -55,10 +54,6 @@
55
54
  "chokidar": "^3.5.3",
56
55
  "commander": "^10.0.1",
57
56
  "console-browserify": "^1.2.0",
58
- "create-astro": "^3.2.2",
59
- "create-next-app": "^13.4.19",
60
- "create-react-app": "^5.0.1",
61
- "create-vue": "^3.7.3",
62
57
  "crypto-browserify": "^3.12.0",
63
58
  "deepmerge": "^4.3.1",
64
59
  "edge-runtime": "^2.4.5",
@@ -67,7 +62,6 @@
67
62
  "events": "^3.3.0",
68
63
  "fast-glob": "^3.3.1",
69
64
  "form-data": "^4.0.0",
70
- "hexo": "^7.0.0-rc2",
71
65
  "https-browserify": "^1.0.0",
72
66
  "inquirer": "^9.2.7",
73
67
  "install": "^0.13.0",
@@ -75,14 +69,12 @@
75
69
  "lodash.merge": "^4.6.2",
76
70
  "log-update": "^5.0.1",
77
71
  "mime-types": "^2.1.35",
78
- "npm": "^9.8.0",
79
72
  "os-browserify": "^0.3.0",
80
73
  "path-browserify": "^1.0.1",
81
74
  "pkg-dir": "^7.0.0",
82
75
  "process": "^0.11.10",
83
76
  "querystring-es3": "^0.2.1",
84
77
  "readable-stream": "^4.4.2",
85
- "rollup-plugin-node-polyfills": "^0.2.1",
86
78
  "semantic-release": "^21.0.7",
87
79
  "semver": "^7.5.2",
88
80
  "signale": "^1.4.0",
@@ -99,8 +91,6 @@
99
91
  "webpack-merge": "^5.9.0"
100
92
  },
101
93
  "devDependencies": {
102
- "@babel/core": "^7.22.5",
103
- "@babel/preset-env": "^7.22.5",
104
94
  "@commitlint/cli": "^18.4.1",
105
95
  "@commitlint/config-conventional": "^18.4.0",
106
96
  "@jest/globals": "^29.5.0",
@@ -111,8 +101,6 @@
111
101
  "@semantic-release/release-notes-generator": "^11.0.4",
112
102
  "@swc/core": "^1.3.96",
113
103
  "@swc/jest": "^0.2.29",
114
- "babel-jest": "^29.5.0",
115
- "babel-plugin-transform-import-meta": "^2.2.0",
116
104
  "clean-jsdoc-theme": "^4.2.9",
117
105
  "conventional-changelog-conventionalcommits": "^4.6.0",
118
106
  "eslint": "^8.49.0",
@@ -133,9 +121,6 @@
133
121
  "supertest": "^6.3.3",
134
122
  "tmp": "^0.2.1"
135
123
  },
136
- "resolutions": {
137
- "@babel/types": "7.22.17"
138
- },
139
124
  "imports": {
140
125
  "#root/*": "./",
141
126
  "#lib/*": "./lib",
@@ -1,8 +0,0 @@
1
- export default {
2
- transform: {
3
- '^.+\\.(js|jsx)?$': 'babel-jest',
4
- },
5
- testPathIgnorePatterns: ['/node_modules/', '/examples/'],
6
- testEnvironment: 'node',
7
- globalSetup: '<rootDir>/jest.global.setup.js',
8
- };
@@ -1,7 +0,0 @@
1
- export default {
2
- transform: {
3
- '^.+\\.(t|j)s?$': '@swc/jest',
4
- },
5
- testPathIgnorePatterns: ['/node_modules/', '/examples/'],
6
- testEnvironment: 'node',
7
- };